RFR: 8377983: (zipfs) ZipFileSystem.initCEN needlessly reads END header

Lance Andersen lancea at openjdk.org
Wed Feb 18 14:50:37 UTC 2026


On Mon, 16 Feb 2026 11:38:03 GMT, Eirik Bjørsnøs <eirbjo at openjdk.org> wrote:

> Please review this cleanup PR which updates `ZipFileSystem.initCEN` to not include the END header when reading the CEN bytes into memory.
> 
> The inclusion of the (unused) END header is a remnant from conversion from native to Java in Java 9 and  was already fixed for the corresponding `ZipFile.Source.initCEN` via JDK-8339711.
> 
> Fixing this also in `ZipFileSystem` cleans up the code locally but more importantly brings the implemenation more into alignment with the `ZipFile`.
> 
> Pure refactoring / cleanup, `noreg-cleanup`.

Thank you for the cleanup PR   I think the changes look reasonable

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

Marked as reviewed by lancea (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/29741#pullrequestreview-3820330751


More information about the core-libs-dev mailing list