RFR: 8151542: URL resources for multi-release jar files have a #runtime fragment appended to them
Chris Hegarty
chris.hegarty at oracle.com
Thu Apr 28 10:55:45 UTC 2016
On 28 Apr 2016, at 09:11, Alan Bateman <Alan.Bateman at oracle.com> wrote:
>
> 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?
It sounds reasonable for this to be a public API, and if so, does it make sense to
move it to JarEntry ( rather than JarFile )? So it would be JarEntry::getTrueName,
or similar.
-Chris.
More information about the core-libs-dev
mailing list