changeset 865:cff0b8694633

7006564: NPE in javac running test/tools/javac/nio/compileTest/CompileTest.java Reviewed-by: mcimadamore, alanb
author jjg
date Wed, 15 Dec 2010 06:39:51 -0800
parents 0141f508b98d
children 3131e664558d
files src/share/classes/com/sun/tools/javac/nio/JavacPathFileManager.java test/tools/javac/nio/compileTest/CompileTest.java
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/javac/nio/JavacPathFileManager.java	Tue Dec 14 14:17:20 2010 -0800
+++ b/src/share/classes/com/sun/tools/javac/nio/JavacPathFileManager.java	Wed Dec 15 06:39:51 2010 -0800
@@ -376,7 +376,8 @@
                 new SimpleFileVisitor<Path>() {
             @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;
--- a/test/tools/javac/nio/compileTest/CompileTest.java	Tue Dec 14 14:17:20 2010 -0800
+++ b/test/tools/javac/nio/compileTest/CompileTest.java	Wed Dec 15 06:39:51 2010 -0800
@@ -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