changeset 39246:e620da3c4b3b

8158185: jdk/test/lib/FileInstaller throws NPE if dst is in current directory Reviewed-by: kvn
author iignatyev
date Tue, 31 May 2016 16:29:45 +0300
parents 698783c3e7eb
children 38c64df6b30f
files hotspot/test/testlibrary/jdk/test/lib/FileInstaller.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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));