RFR: 8297875: jar should not compress the manifest directory entry

Liam Miller-Cushon cushon at openjdk.org
Wed Nov 30 22:05:46 UTC 2022


On Wed, 30 Nov 2022 18:48:30 GMT, Liam Miller-Cushon <cushon at openjdk.org> wrote:

> This causes jar to not compress the `META-INF/` directory entry, for consistency with the handling of other directory entries and compliance with `APPNOTE.TXT`, and for compatibility with other zip implementations.

Thanks for the review!

> I am not sure their is an actual issue based on my read of the APP.NOTE and a quick look at the generated bytes, but I also do not see any harm with the change as to your point this is done for other directories via the jar tool as well as other zip tools such as info zip

I agree APP.NOTE isn't completely clear on this. I think "directories ... must not include file data" could be read as saying that the uncompressed size must be zero, or that the uncompressed and compressed size should be zero. But I also agree with your summary that seems harmless and is consistent with the handling of other directories. It seems likely to me this was an oversight in the original implementation.

> The test does not check to see if the method is stored.

Done

> I would also consider converting the test to TestNG as you can leverage its assertXXX methods and remove the need for the doTest() method

Done

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

PR: https://git.openjdk.org/jdk/pull/11441


More information about the compiler-dev mailing list