RFR: 8303920: Avoid calling out to python in DataDescriptorSignatureMissing test [v8]

Eirik Bjorsnos duke at openjdk.org
Mon Oct 30 17:48:52 UTC 2023


On Mon, 30 Oct 2023 15:02:57 GMT, Lance Andersen <lancea at openjdk.org> wrote:

> Another question, is the zip that is generated by this test readable by other zip tools such as info-zip, Apache Common-compress, winzip?

- info-zip: Does not support unzipping from a zip,  so uses the CEN instead of the data descriptor.
- Apache commons-compress, reads the signature-less ZIP just fine.
- winzip: I do not currently have easy access to Windows, so can't test this. But I would assume it also uses the CEN when unzipping

> test/jdk/java/util/zip/DataDescriptorSignatureMissing.java line 3:
> 
>> 1: /*
>> 2:  * Copyright 2012 Google, Inc.  All Rights Reserved.
>> 3:  * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
> 
> I am not sure the copyright can be updated this way @irisclark, could you provide guidance

This way of updating the copyright was suggested by @jaikiran in the March 10th comment above. Would be nice to get this clarified, yes.

> test/jdk/java/util/zip/DataDescriptorSignatureMissing.java line 34:
> 
>> 32:  * without data descriptors was found.
>> 33:  * @run testng DataDescriptorSignatureMissing
>> 34:  */
> 
> Can we convert this please to use junit

Converted to junit as suggested.

> test/jdk/java/util/zip/DataDescriptorSignatureMissing.java line 76:
> 
>> 74:     /**
>> 75:      * Produce a ZIP file where the first entry has a signature-less data descriptor
>> 76:      */
> 
> I think it would be useful to show the  what the internal zip representation of the LOC and CEN looks like to make it clear what a signature-less data descriptor is meant to be for future maintainers

Added a comment including some structural examples. (I personally feel it maybe ended up a bit excessive)

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

PR Comment: https://git.openjdk.org/jdk/pull/12959#issuecomment-1785744562
PR Review Comment: https://git.openjdk.org/jdk/pull/12959#discussion_r1376602288
PR Review Comment: https://git.openjdk.org/jdk/pull/12959#discussion_r1376602596
PR Review Comment: https://git.openjdk.org/jdk/pull/12959#discussion_r1376603460


More information about the core-libs-dev mailing list