comparison test/testlibrary/ClassFileInstaller.java @ 10423:a6697eaddebd

Merge.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Wed, 19 Jun 2013 21:54:38 +0200
parents 43083e670adf
children
comparison
equal deleted inserted replaced
10422:a47dd157277e 10423:a6697eaddebd
43 String pathName = arg.replace('.', '/').concat(".class"); 43 String pathName = arg.replace('.', '/').concat(".class");
44 InputStream is = cl.getResourceAsStream(pathName); 44 InputStream is = cl.getResourceAsStream(pathName);
45 45
46 // Create the class file's package directory 46 // Create the class file's package directory
47 Path p = Paths.get(pathName); 47 Path p = Paths.get(pathName);
48 Files.createDirectories(p.getParent()); 48 if (pathName.contains("/")) {
49 Files.createDirectories(p.getParent());
50 }
49 // Create the class file 51 // Create the class file
50 Files.copy(is, p, StandardCopyOption.REPLACE_EXISTING); 52 Files.copy(is, p, StandardCopyOption.REPLACE_EXISTING);
51 } 53 }
52 } 54 }
53 } 55 }