RFR: 6957241: ClassLoader.getResources() returns only 1 instance when using jar indexing

Lance Andersen lance.andersen at oracle.com
Sat Sep 4 11:12:19 UTC 2021

On Sep 4, 2021, at 2:53 AM, Alan Bateman <alanb at openjdk.java.net<mailto:alanb at openjdk.java.net>> wrote:

On Sat, 4 Sep 2021 01:53:35 GMT, wxiang <github.com+53162078+shiyuexw at openjdk.org<mailto:github.com+53162078+shiyuexw at openjdk.org>> wrote:

I will first create the patch to remove JAR index support from the URLClassLoader implementation, the `jar i` option.

Thank you. We'll probably need a new JBS issue and PR for that but let's see first if any issues come out of the wood work. Stuart is right that another option for the jar tool is to drop the index when updating an existing JAR file that has an index, we don't need to decide that just yet.

Perhaps the jar validate option could/should be updated to flag when an index is there?

We could add a warning for JDK 18 when main::genIndex is invoked as I assume we would want to at least wait until JDK19 to remove this functionality?



PR: https://git.openjdk.java.net/jdk/pull/5316

[cid:E1C4E2F0-ECD0-4C9D-ADB4-B16CA7BCB7FC at home]

Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
Oracle Java Engineering
1 Network Drive
Burlington, MA 01803
Lance.Andersen at oracle.com<mailto:Lance.Andersen at oracle.com>

More information about the core-libs-dev mailing list