changeset 43309:5df4efb223bd

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