- 
    Bug 
- 
    Resolution: Fixed
- 
     P3 P3
- 
    13
- 
        b24
- 
        generic
- 
        generic
| Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build | 
|---|---|---|---|---|---|---|
| JDK-8225861 | 14 | Sundararajan Athijegannathan | P3 | Resolved | Fixed | team | 
                    Consider the following: 
var uri = URI.create("jrt:/java.base/module-info.class");
var path = Path.of(uri);
assertTrue(Files.exists(path));
This fails because the file path returned by JrtFIleSystemProvider getPath(URI) is "/java.base/module-info.class", it should be "/modules/java.base/module-info.class".
If this bug is fixed then the following round trip should also work:
// check round-trip
var jrtfs = FileSystems.getFileSystem(URI.create("jrt:/"));
assertTrue(Files.exists(jrtfs.getPath(path.toString())));
            
var uri = URI.create("jrt:/java.base/module-info.class");
var path = Path.of(uri);
assertTrue(Files.exists(path));
This fails because the file path returned by JrtFIleSystemProvider getPath(URI) is "/java.base/module-info.class", it should be "/modules/java.base/module-info.class".
If this bug is fixed then the following round trip should also work:
// check round-trip
var jrtfs = FileSystems.getFileSystem(URI.create("jrt:/"));
assertTrue(Files.exists(jrtfs.getPath(path.toString())));
- backported by
- 
                    JDK-8225861 jrtfs URI to Path and Path to URI conversions are wrong -           
- Resolved
 
-         
- csr for
- 
                    JDK-8227076 A jrt URI can only encode paths to files in /modules tree -           
- Closed
 
-         
- relates to
- 
                    JDK-8216553 JrtFIleSystemProvider getPath(URI) omits /modules element from file path -           
- Closed
 
-         
- 
                    JDK-8242172 Path.toAbsolutePath() and Path.toUri() should not throw IOError -           
- Closed
 
-         
- 
                    JDK-8242258 (jrtfs) Path::toUri throws AssertionError for malformed input -           
- Closed
 
-