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

JavaRuntimeURLConnection should only connect to non-directory resources

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • 26
    • 9, 26
    • core-libs
    • None
    • 9

      The code in `sun.net.www.protocol.jrt.JavaRuntimeURLConnection` supports the URL connection for the `jrt:` URI scheme. The intent is to allow URIs such as "jrt:/java.base/java/lang/Object.class" to return a resource (e.g. class bytes) from the running JVM.

      It's implementation uses `ImageLocation` internally. It would be better to use `ImageReader#Node` to allow ImageLocation be further encapsulated in the future.

      Currently both URIs:
      * "jrt:/modules/java.base/java/lang"
      * "jrt:/packages/java.lang"

      connect to a resource. It would be better to throw.

            dabeaumo David Beaumont
            dabeaumo David Beaumont
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: