Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8224946 jrtfs URI to Path and Path to URI conversions are wrong
  3. JDK-8226948

Release Note: A jrt URI Can Only Encode Paths to Files in /modules Tree

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Delivered
    • Icon: P4 P4
    • 13
    • 13
    • tools
    • Verified

      A `jrt` URL is a hierarchical URI with the syntax `jrt:/[$MODULE[/$PATH]]`. When using the `jrt` file system, a `java.net.URI` object can be created with the `java.nio.file.Path::toUri` method to encode a normalized path to a file in the `/modules` tree. A `jrt` URL cannot encode a path to a file in the `/packages` tree. The `jrt` file system provider has been changed in this release so that `toUri` fails with `IOError` when it is not possible to encode the file path as a `jrt` URI. This change might impact tools that assume a URI can be created to locate files in the `/packages` tree. Tools with paths to files in `/packages` can use the `toRealPath()` method to obtain the real path (in `/modules`) before attempting to convert the file path to a URI.

            alanb Alan Bateman
            alanb Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: