RFR: 8273401: Disable JarIndex support in URLClassPath

Daniel Fuchs dfuchs at openjdk.java.net
Wed Sep 15 12:05:46 UTC 2021

On Wed, 15 Sep 2021 12:00:07 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>> There is a bug for URLClassPath.findResources with JarIndex.
>> Currently, there was agreement on dropping the support from the URLClassLoader implementation but it was suggested that it should be disabled for a release or two before the code is removed. 
>> A system property can be used to re-enable JarIndex support in URLClassPath.
>> The PR includes:
>> Disable JarIndex support in URLClassPath by default.
>> Add system property jdk.net.URLClassPath.enableJarIndex to re-enable JarIndex support.
> src/java.base/share/classes/jdk/internal/loader/URLClassPath.java line 115:
>> 113: 
>> 114:         p = props.getProperty("jdk.net.URLClassPath.enableJarIndex");
>> 115:         ENABLE_JAR_INDEX = p != null ? p.equals("true") : false;
> Maybe this should use the same pattern than the other property above:
> ENABLE_JAR_INDEX = p != null ? p.equals("true") || p.isEmpty() : false;

Another question is where to document this property. We will obviously need a CSR and releases notes. I also wonder if it should be promoted into a networking property - which would make it possible to document it in the `net.properties` file. @AlanBateman what do you think?


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

More information about the core-libs-dev mailing list