This commit is contained in:
Jan Bartel 2017-07-26 09:38:49 +02:00 committed by Joakim Erdfelt
parent 98eb354c46
commit e81e17d348
1 changed files with 9 additions and 2 deletions

View File

@ -978,11 +978,18 @@ public class AnnotationParser
return false;
//skip anything that is not a class file
if (!name.toLowerCase(Locale.ENGLISH).endsWith(".class"))
String lc = name.toLowerCase(Locale.ENGLISH);
if (!lc.endsWith(".class"))
{
if (LOG.isDebugEnabled()) LOG.debug("Not a class: {}",name);
return false;
}
if (lc.equals("module-info.class"))
{
if (LOG.isDebugEnabled()) LOG.debug("Skipping module-info.class");
return false;
}
//skip any classfiles that are not a valid java identifier
int c0 = 0;
@ -990,7 +997,7 @@ public class AnnotationParser
c0 = (ldir > -1 ? ldir+1 : c0);
if (!Character.isJavaIdentifierStart(name.charAt(c0)))
{
if (LOG.isDebugEnabled()) LOG.debug("Not a java identifier: {}"+name);
if (LOG.isDebugEnabled()) LOG.debug("Not a java identifier: {}",name);
return false;
}