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

Eirik Bjørsnøs eirbjo at openjdk.org
Mon Feb 16 15:24:43 UTC 2026


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`.

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

Commit messages:
 - Don't include the END header when reading CEN into memory

Changes: https://git.openjdk.org/jdk/pull/29741/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29741&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8377983
  Stats: 8 lines in 1 file changed: 0 ins; 0 del; 8 mod
  Patch: https://git.openjdk.org/jdk/pull/29741.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/29741/head:pull/29741

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


More information about the core-libs-dev mailing list