Can I please get a review of this change which proposes to revert the changes 
that were done to `java.util.zip.GZIPInputStream` in Java 23 through 
https://bugs.openjdk.org/browse/JDK-7036144?

As noted in https://bugs.openjdk.org/browse/JDK-8381670, that change in 
JDK-7036144 introduced a couple of regressions. One of them was a performance 
regression which was addressed recently 
https://bugs.openjdk.org/browse/JDK-8374644. The other one is a currently open 
issue https://bugs.openjdk.org/browse/JDK-8377896.

Given these regressions, I believe it's appropriate to revert the changes done 
in JDK-7036144 to bring back the implementation of `GZIPInputStream` to the 
state which was there prior to Java 23. That implementation has been around for 
several decades and has now shown that the usage of `InputStream.available()` 
is serving its purpose in that part of the code. Like noted in JDK-8381670, 
there may be ways to fix these regressions and yet avoid the usage of 
`InputStream.available()`, but those experiments are better done as an 
enhancement and in their own time, allowing for evaluating whether the 
change/enhancement is worth doing at all. In the meantime, it would benefit to 
revert the JDK-7036144 change.

This PR was created by doing a "git revert 
a4fb07ee3e26c2f0ed3111c39c3a22167d292d04" (the performance regression fix done 
in JDK-8374644) and "git revert  d3f3011d56267360d65841da3550eca79cf1575b" (the 
change done in JDK-7036144).

tier1, tier2, tier3 testing has completed successfully with this change. A CSR 
has been drafted for this change https://bugs.openjdk.org/browse/JDK-8381671 
and a release note will be added too.

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

Commit messages:
 - Revert "7036144: GZIPInputStream readTrailer uses faulty available() test 
for end-of-stream"
 - Revert "8374644: Regression in GZIPInputStream performance after JDK-7036144"

Changes: https://git.openjdk.org/jdk/pull/30588/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=30588&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8381670
  Stats: 154 lines in 2 files changed: 6 ins; 133 del; 15 mod
  Patch: https://git.openjdk.org/jdk/pull/30588.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/30588/head:pull/30588

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

Reply via email to