changeset 16561:f1d567c355a9

8168537: Test fails with AccessControlException Reviewed-by: prr, serb
author alexsch
date Wed, 18 Jan 2017 17:22:03 +0300
parents 543c4e4b0311
children 78392a83b36e
files src/java.desktop/share/classes/sun/awt/shell/ShellFolder.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.desktop/share/classes/sun/awt/shell/ShellFolder.java	Wed Jan 18 18:14:50 2017 +0300
+++ b/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);