< prev index next >
test/testlibrary/jdk/test/lib/FileInstaller.java
Print this page
rev 11310 : 8158185: jdk/test/lib/FileInstaller throws NPE if dst is in current directory
Reviewed-by:
*** 43,54 ****
*/
public static void main(String[] args) throws IOException {
if (args.length != 2) {
throw new IllegalArgumentException("Unexpected number of arguments for file copy");
}
! Path src = Paths.get(Utils.TEST_SRC, args[0]);
! Path dst = Paths.get(args[1]);
if (src.toFile().exists()) {
if (src.toFile().isDirectory()) {
Files.walkFileTree(src, new CopyFileVisitor(src, dst));
} else {
Path dstDir = dst.getParent();
--- 43,54 ----
*/
public static void main(String[] args) throws IOException {
if (args.length != 2) {
throw new IllegalArgumentException("Unexpected number of arguments for file copy");
}
! Path src = Paths.get(Utils.TEST_SRC, args[0]).toAbsolutePath();
! Path dst = Paths.get(args[1]).toAbsolutePath();
if (src.toFile().exists()) {
if (src.toFile().isDirectory()) {
Files.walkFileTree(src, new CopyFileVisitor(src, dst));
} else {
Path dstDir = dst.getParent();
< prev index next >