8027803: test/sun/reflect/AnonymousNewInstance/ManyNewInstanceAnonTest.java fails

Fix NPE in test infrastructure

Reviewed-by: ksrini, jfranck, alanb, rfield
This commit is contained in:
Alan Bateman 2013-11-11 16:14:07 -08:00 committed by Robert Field
parent f952749e41
commit a08f1c2f3a

View File

@ -45,7 +45,10 @@ public class ClassFileInstaller {
// Create the class file's package directory
Path p = Paths.get(pathName);
Files.createDirectories(p.getParent());
Path parent = p.getParent();
if (parent != null) {
Files.createDirectories(parent);
}
// Create the class file
Files.copy(is, p, StandardCopyOption.REPLACE_EXISTING);
}