jdk/src/java.base/share/classes/jdk/internal/jrtfs/JrtFileSystemProvider.java
changeset 37516 66a0579e606c
parent 37365 9cc4eb4d7491
child 37782 ad8fe7507ecc
equal deleted inserted replaced
37396:8d78fb40648d 37516:66a0579e606c
    99     }
    99     }
   100 
   100 
   101     @Override
   101     @Override
   102     public FileSystem newFileSystem(URI uri, Map<String, ?> env)
   102     public FileSystem newFileSystem(URI uri, Map<String, ?> env)
   103             throws IOException {
   103             throws IOException {
       
   104         Objects.requireNonNull(env);
   104         checkPermission();
   105         checkPermission();
   105         checkUri(uri);
   106         checkUri(uri);
   106 
   107         if (env.containsKey("java.home")) {
   107         if (env != null && env.containsKey("java.home")) {
       
   108             return newFileSystem((String)env.get("java.home"), uri, env);
   108             return newFileSystem((String)env.get("java.home"), uri, env);
   109         } else {
   109         } else {
   110             return new JrtFileSystem(this, env);
   110             return new JrtFileSystem(this, env);
   111         }
   111         }
   112     }
   112     }