RFR: 8297875: jar should not compress the manifest directory entry [v3]

Lance Andersen lancea at openjdk.org
Thu Dec 1 11:51:27 UTC 2022


On Thu, 1 Dec 2022 01:29:40 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.
>
> Liam Miller-Cushon has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Improve test

Thank you again for the latest updates.  I think we are close.  Please see the comments to further streamline the test and once addressed we should be good to go.

test/jdk/tools/jar/ManifestDirectoryCompression.java line 81:

> 79: 
> 80:     @Test
> 81:     public void run() throws Exception {

Please rename `run() `to something like `TestDirectoryCompressionMethod()`.  We are trying to make new tests have more meaningful names.

test/jdk/tools/jar/ManifestDirectoryCompression.java line 83:

> 81:     public void run() throws Exception {
> 82:         Path entryPath = Files.writeString(tempDir.resolve("test.txt"), "Some text...");
> 83:         Path jar = tempDir.resolve("test.jar");

Please see comment above regarding the cleanup method.

One other thought you could consider given you only create a jar and file to add to the jar, is to simply add File.deleteIfExists() calls and not bother with a cleanup method given the test case is small and pretty straight forward.  Your choice though :-)

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

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


More information about the compiler-dev mailing list