各位小伙伴:看到这个关于码头的异常,我很困惑。
Exception in thread "Scanner-1" java.lang.NullPointerException
at org.eclipse.jetty.util.Scanner.scanFile(Scanner.java:576)
at org.eclipse.jetty.util.Scanner.scanFiles(Scanner.java:438)
at org.eclipse.jetty.util.Scanner.scan(Scanner.java:397)
at org.eclipse.jetty.util.Scanner$1.run(Scanner.java:348)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Exception in thread "Scanner-0" java.lang.NullPointerException
at org.eclipse.jetty.util.Scanner.scanFile(Scanner.java:576)
at org.eclipse.jetty.util.Scanner.scanFiles(Scanner.java:438)
at org.eclipse.jetty.util.Scanner.scan(Scanner.java:397)
at org.eclipse.jetty.util.Scanner$1.run(Scanner.java:348)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Scanner.java 的源代码是:
// If it is a directory, scan if it is a known directory or the depth is OK.
573 if (f.isDirectory() && (depth<_scanDepth || _scanDepth==-1 ||
_scanDirs.contains(f)))
574 {
575 File[] files = f.listFiles();
576 for (int i=0;i<files.length;i++)
577 scanFile(files[i], scanInfoMap,depth+1);
578 }
579 }
第576行代码如何发生nullpointer异常?
码头版本:8.1.3.v20120416
需要你们的帮助,3q太糊涂了。