8158185: jdk/test/lib/FileInstaller throws NPE if dst is in current directory
authoriignatyev
Tue, 31 May 2016 16:29:45 +0300
changeset 39246 e620da3c4b3b
parent 39245 698783c3e7eb
child 39247 38c64df6b30f
8158185: jdk/test/lib/FileInstaller throws NPE if dst is in current directory Reviewed-by: kvn
hotspot/test/testlibrary/jdk/test/lib/FileInstaller.java
--- a/hotspot/test/testlibrary/jdk/test/lib/FileInstaller.java	Tue May 31 16:29:45 2016 +0300
+++ b/hotspot/test/testlibrary/jdk/test/lib/FileInstaller.java	Tue May 31 16:29:45 2016 +0300
@@ -45,8 +45,8 @@
         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]);
+        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));