RFR: 8302819: Remove JAR Index [v5]

Lance Andersen lancea at openjdk.org
Wed Apr 5 10:28:20 UTC 2023


On Wed, 5 Apr 2023 07:05:11 GMT, Eirik Bjorsnos <duke at openjdk.org> wrote:

> > The new test that was planned for testing `JarFile` and `JarInputStream` when dealing with a jar containing a `META-INF/INDEX.LIST`, is that something that you want to be done as a separate PR/task? It's fine with me if you want that to be done separately.
> 
> @jaikiran
> 
> I was looking into creating such a test yesterday. For `JarInputStream`, I was able to write a tests which expects a certain order of entries. This could made broken by disabling the `META-INF/INDEX.LIST` check in `JarInputStream.getNextEntry`.
> 
> With `JarVerifier`, I'm struggling to create a scenario which excercises the `META-INF/INDEX.LIST` check. It seems to me this code is simply unreachable, even after moving the `META-INF/INDEX.LIST` file first in the JAR.
> 
> If the code is properly unreachable, then maybe we should consider removing it?
> 
> In any case, since I feel the current test is somewhat dubious, I checked it into another branch here:
> 
> https://github.com/eirbjo/jdk/blob/remove-jar-index-test/test/jdk/java/util/jar/JarFile/JarIndexLegacyJars.java
> 
> This is perhaps better than having no tests. I'm not feeling sure about this, please let me know what you think. Perhaps @AlanBateman also has an opinion on this?

I am not convinced we need a test but to your point Jai, Eirik, lets handle this as a separate PR/Issue and work through what we are hoping to achieve/validate

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

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


More information about the core-libs-dev mailing list