Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8216553

JrtFIleSystemProvider getPath(URI) omits /modules element from file path

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 13
    • 13
    • tools
    • b23

    Backports

      Description

        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())));

        Attachments

          Issue Links

            There are no Sub-Tasks for this issue.

            Activity

              People

                sundar Sundararajan Athijegannathan
                alanb Alan Bateman
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: