RFR: 8338931: ZipEntry.flag could be made internal to ZipOutputStream [v2]

Eirik Bjørsnøs eirbjo at openjdk.org
Tue Aug 27 14:36:20 UTC 2024


> Please review this refactoring PR which moves the `ZipEntry.flag` field to `ZipOutputStream.XEntry`.
> 
> Moving this field will save four bytes from the `ZipEntry` object size and also saves an unneccessary read in `ZipFile.getZipEntry`.
> 
> Testing:
> 
> This PR is a refactoring of existing code and does not update any tests. I added the label `noreg-cleanup` to the JBS issue.
> 
> The following runs clean:
> 
> 
> make test TEST="test/jdk/java/util/zip"
> make test TEST="test/jdk/java/util/jar"
> 
> 
> Performance:
> 
> The JMH benchmark `java.util.zip.ZipFileGetEntry.getEntryHit` show a small but consistent improvement (2-3%).

Eirik Bjørsnøs has updated the pull request incrementally with one additional commit since the last revision:

  Revert "Rename XEntry.flag to XEntry.flags"
  
  This reverts commit 4ac3abfde8bcd800cf4f8ad4c5538791d9921e58.

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/20702/files
  - new: https://git.openjdk.org/jdk/pull/20702/files/4ac3abfd..97eec65d

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=20702&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=20702&range=00-01

  Stats: 6 lines in 1 file changed: 0 ins; 0 del; 6 mod
  Patch: https://git.openjdk.org/jdk/pull/20702.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/20702/head:pull/20702

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


More information about the core-libs-dev mailing list