RFR: 8302819: Remove JAR Index [v5]

Alan Bateman alanb at openjdk.org
Thu Apr 6 07:35:20 UTC 2023


On Thu, 30 Mar 2023 14:21:29 GMT, Eirik Bjorsnos <duke at openjdk.org> wrote:

>> This PR removes the JAR index feature from the runtime:
>> 
>> - `URLClassPath` is  updated to remove the `enableJarIndex` system property and any code which would be called when this property was `true`
>> - The `JarIndex` implementation class is moved into `jdk.jartool` module.
>> - The `InvalidJarIndexError` exception class is removed because it falls out of use
>> - The test `test/jdk/sun/misc/JarIndex/metaInfFileNames/Basic.java` is removed because it depends on the JarIndex feature being present
>> - The test `test/jdk/sun/misc/JarIndex/JarIndexMergeForClassLoaderTest.java` is removed because it depends on the JarIndex feature being present
>> - The test `test/jdk/sun/misc/JarIndex/JarIndexMergeTest.java` is removed because it end up being the only caller of the  JarIndex.merge feature
>> - All `JarIndex` methods/constructors which are not used by the `jar -i` implementation are removed. 
>> - `JarIndex` is given package-private access.
>
> Eirik Bjorsnos has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Include a warning saying that 'The JAR index (META-INF/INDEX.LIST) is ignored at run-time since JDK 18'

One additional thing we could do is update the usage output for -i/--generate-index to say that the option is deprecated. Looking at `jdeps -help` output to see this for the deprecated -P/--profile option.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/13158#issuecomment-1498617201



More information about the security-dev mailing list