7006564: NPE in javac running test/tools/javac/nio/compileTest/CompileTest.java

Reviewed-by: mcimadamore, alanb
This commit is contained in:
Jonathan Gibbons 2010-12-15 06:39:51 -08:00
parent cfe2f7eb5d
commit facb1c1b6d
2 changed files with 3 additions and 2 deletions

View File

@ -376,7 +376,8 @@ public class JavacPathFileManager extends BaseFileManager implements PathFileMan
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;

View File

@ -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