8168537: Test fails with AccessControlException
authoralexsch
Wed, 18 Jan 2017 17:22:03 +0300
changeset 43309 5df4efb223bd
parent 43308 cff6230190e5
child 43310 0746906c86f6
8168537: Test fails with AccessControlException Reviewed-by: prr, serb
jdk/src/java.desktop/share/classes/sun/awt/shell/ShellFolder.java
--- a/jdk/src/java.desktop/share/classes/sun/awt/shell/ShellFolder.java	Wed Jan 18 18:14:50 2017 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/awt/shell/ShellFolder.java	Wed Jan 18 17:22:03 2017 +0300
@@ -32,7 +32,7 @@
 import java.io.FileNotFoundException;
 import java.nio.file.Files;
 import java.nio.file.LinkOption;
-import java.nio.file.Path;
+import java.nio.file.Paths;
 import java.util.*;
 import java.util.concurrent.Callable;
 
@@ -244,7 +244,7 @@
             return (ShellFolder)file;
         }
 
-        if (!Files.exists(file.toPath(), LinkOption.NOFOLLOW_LINKS)) {
+        if (!Files.exists(Paths.get(file.getPath()), LinkOption.NOFOLLOW_LINKS)) {
             throw new FileNotFoundException();
         }
         return shellFolderManager.createShellFolder(file);