RFR: 8151542: URL resources for multi-release jar files have a #runtime fragment appended to them
Alan Bateman
Alan.Bateman at oracle.com
Thu Apr 28 08:11:24 UTC 2016
On 27/04/2016 22:58, Steve Drach wrote:
> Issue: https://bugs.openjdk.java.net/browse/JDK-8151542 <https://bugs.openjdk.java.net/browse/JDK-8151542>
>
> Webrev: http://cr.openjdk.java.net/~sdrach/8151542/webrev/ <http://cr.openjdk.java.net/~sdrach/8151542/webrev/>
>
> This changeset causes the URL returned from a ClassLoader.getResource(name) invocation to be reified, that is the URL is a direct pointer to either a versioned or unversioned entry in the jar file. The patch also assures that jar URL’s are always processed by the URLClassPath.JarLoader. The MultiReleaseJarURLConnection test was enhanced to demonstrate that reified URLs are returned. The SimpleHttpServer test helper class was moved into it’s own file.
I was happy to see John's note on diction so I assume the method will be
renamed. Have you considered making it public so that tools and
libraries outside of the JDK can use this?
One question on URLClassPath getLoader as it's not immediately obvious
that this is needed. URLClassLoader specifies that any URL ending with
"/" is assumed to be a directory.
Are you planning to update java.net.JarURLConnection as that has special
handling for #runtime that will need to be replaced.
-Alan
More information about the core-libs-dev
mailing list