diff --git a/src/share/classes/com/sun/tools/javac/nio/JavacPathFileManager.java b/src/share/classes/com/sun/tools/javac/nio/JavacPathFileManager.java index 52672f8185af1c7d3ba0687218c18a69a4fef7f4..1a129354ca282d29cccc6bf849343676445789bf 100644 --- a/src/share/classes/com/sun/tools/javac/nio/JavacPathFileManager.java +++ b/src/share/classes/com/sun/tools/javac/nio/JavacPathFileManager.java @@ -376,7 +376,8 @@ public class JavacPathFileManager extends BaseFileManager implements PathFileMan new SimpleFileVisitor() { @Override public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) { - if (SourceVersion.isIdentifier(dir.getName().toString())) // JSR 292? + Path name = dir.getName(); + if (name == null || SourceVersion.isIdentifier(name.toString())) // JSR 292? return FileVisitResult.CONTINUE; else return FileVisitResult.SKIP_SUBTREE; diff --git a/test/tools/javac/nio/compileTest/CompileTest.java b/test/tools/javac/nio/compileTest/CompileTest.java index b93fbfe9ded3b6c331c17930d7d5f8b49fe27809..8ec44426c12600353f109ea189ed47a21c9f8284 100644 --- a/test/tools/javac/nio/compileTest/CompileTest.java +++ b/test/tools/javac/nio/compileTest/CompileTest.java @@ -23,7 +23,7 @@ /** * @test - * @bug 6906175 6915476 6915497 + * @bug 6906175 6915476 6915497 7006564 * @summary Path-based JavaFileManager * @compile -g HelloPathWorld.java * @run main CompileTest