RFR: 8377992: (zipfs) Align ZipFileSystem END header validation with the ZipFile implementation
Eirik Bjørsnøs
eirbjo at openjdk.org
Thu Feb 19 18:37:21 UTC 2026
On Thu, 19 Feb 2026 17:12:23 GMT, Lance Andersen <lancea at openjdk.org> wrote:
> So you could create a utility class which is shared by the ZipFile or ZipFs test or take the easier route of having a copy of the code in each directory.
I opted to extract the test vector setup and some shared constants into `jdk.test.lib.util.ZipUtils`. I retained a copyright year of 2023, 2026 for this one.
I then copied `EndOfCenValidation` to ZipFS. Some cleanups applied first, such as extracting the method `verifyRejection` to handle the repeated `assertThrows`, `assertEquals` checks.
While this does not eliminate duplication, it avoids it in the test vector setup which is were it would hurt the most.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/29747#issuecomment-3929116938
More information about the core-libs-dev
mailing list