# HG changeset patch # User rfield # Date 1384215247 28800 # Node ID b485e4eb2fd932663607989a718f5e6f7e555596 # Parent d1825822d9a08829ed0f0e7914e990acc7d57777 8027803: test/sun/reflect/AnonymousNewInstance/ManyNewInstanceAnonTest.java fails Summary: fix NPE in test infrastructure Reviewed-by: ksrini, jfranck, alanb, rfield Contributed-by: alan.bateman@oracle.com diff -r d1825822d9a0 -r b485e4eb2fd9 jdk/test/lib/testlibrary/ClassFileInstaller.java --- a/jdk/test/lib/testlibrary/ClassFileInstaller.java Mon Nov 11 14:35:36 2013 -0800 +++ b/jdk/test/lib/testlibrary/ClassFileInstaller.java Mon Nov 11 16:14:07 2013 -0800 @@ -45,7 +45,10 @@ // 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); }