Skip to content

Commit

Permalink
Issue #9400 Handle scan of weird jar format
Browse files Browse the repository at this point in the history
  • Loading branch information
janbartel committed Feb 24, 2023
1 parent de3adc8 commit c07511a
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -931,6 +931,11 @@ public boolean isValidClassFileName(String name)
LOG.debug("Not a class: {}", name);
return false;
}

//get just the last name portion
int ldir = lc.lastIndexOf('/', lc.length());
int c0 = (ldir < 0 ? 0 : ldir + 1);
lc = lc.substring(c0);

if (lc.equals("module-info.class"))
{
Expand All @@ -940,9 +945,6 @@ public boolean isValidClassFileName(String name)
}

//skip any classfiles that are not a valid java identifier
int c0 = 0;
int ldir = name.lastIndexOf('/', name.length() - 6);
c0 = (ldir > -1 ? ldir + 1 : c0);
if (!Character.isJavaIdentifierStart(name.charAt(c0)))
{
if (LOG.isDebugEnabled())
Expand Down

0 comments on commit c07511a

Please sign in to comment.