src/java.base/share/classes/jdk/internal/jrtfs/JrtFileSystemProvider.java
changeset 55070 d850d0f41c72
parent 55057 63ab89cc3e69
child 55107 931a4d5367a6
equal deleted inserted replaced
55069:6e0786d8451b 55070:d850d0f41c72
   188         }
   188         }
   189         if (uri.getFragment() != null) {
   189         if (uri.getFragment() != null) {
   190             throw new IllegalArgumentException("Fragment component present");
   190             throw new IllegalArgumentException("Fragment component present");
   191         }
   191         }
   192         String path = uri.getPath();
   192         String path = uri.getPath();
   193         if (path == null || path.charAt(0) != '/' || path.contains("..")) {
   193         if (path == null || path.charAt(0) != '/') {
   194             throw new IllegalArgumentException("Invalid path component");
   194             throw new IllegalArgumentException("Invalid path component");
   195         }
   195         }
   196         return getTheFileSystem().getPath("/modules" + path);
   196         return getTheFileSystem().getPath(path);
   197     }
   197     }
   198 
   198 
   199     private FileSystem getTheFileSystem() {
   199     private FileSystem getTheFileSystem() {
   200         checkPermission();
   200         checkPermission();
   201         FileSystem fs = this.theFileSystem;
   201         FileSystem fs = this.theFileSystem;