419655 AnnotationParser throws NullPointerException when scanning files from jar:file urls

This commit is contained in:
Jan Bartel 2013-10-21 16:42:27 +11:00
parent 565bd3b331
commit b9020d200a
1 changed files with 7 additions and 2 deletions

View File

@ -18,6 +18,7 @@
package org.eclipse.jetty.annotations;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
@ -770,8 +771,8 @@ public class AnnotationParser
else
{
//we've already verified the directories, so just verify the class file name
String filename = res.getFile().getName();
if (isValidClassFileName(filename))
File file = res.getFile();
if (isValidClassFileName((file==null?null:file.getName())))
{
String name = res.getName();
if ((resolver == null)|| (!resolver.isExcluded(name) && (!isParsed(name) || resolver.shouldOverride(name))))
@ -782,6 +783,10 @@ public class AnnotationParser
}
}
else
{
if (LOG.isDebugEnabled()) LOG.debug("Skipping scan on invalid file {}", res);
}
}
}
catch (Exception ex)