404283 org.eclipse.jetty.util.Scanner.scanFile() dies with an NPE if listFiles() returns null
This commit is contained in:
parent
e553e2ec1f
commit
af53d94b8b
|
@ -578,8 +578,14 @@ public class Scanner extends AbstractLifeCycle
|
||||||
if (f.isDirectory() && (depth<_scanDepth || _scanDepth==-1 || _scanDirs.contains(f)))
|
if (f.isDirectory() && (depth<_scanDepth || _scanDepth==-1 || _scanDirs.contains(f)))
|
||||||
{
|
{
|
||||||
File[] files = f.listFiles();
|
File[] files = f.listFiles();
|
||||||
for (int i=0;i<files.length;i++)
|
if (files != null)
|
||||||
scanFile(files[i], scanInfoMap,depth+1);
|
{
|
||||||
|
for (int i=0;i<files.length;i++)
|
||||||
|
scanFile(files[i], scanInfoMap,depth+1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
LOG.warn("Error listing files in directory {}", f);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (IOException e)
|
catch (IOException e)
|
||||||
|
|
Loading…
Reference in New Issue