test/jdk/internal/jrtfs/WithSecurityManager.java

Print this page

        

@@ -29,10 +29,11 @@
 
 import java.net.URI;
 import java.nio.file.FileSystems;
 import java.nio.file.Path;
 import java.nio.file.Paths;
+import java.util.Collections;
 
 public class WithSecurityManager {
     public static void main(String[] args) throws Exception {
         boolean allow = args[0].equals("allow");
 

@@ -59,11 +60,11 @@
                 throw se;
         }
 
         // check FileSystems.newFileSystem
         try {
-            FileSystems.newFileSystem(URI.create("jrt:/"), null);
+            FileSystems.newFileSystem(URI.create("jrt:/"), Collections.emptyMap());
             if (!allow) throw new RuntimeException("access not expected");
         } catch (SecurityException se) {
             if (allow)
                 throw se;
         }