RFR: 8374644: Regression in GZIPInputStream performance after JDK-7036144 [v2]
Jaikiran Pai
jpai at openjdk.org
Thu Jan 8 12:16:23 UTC 2026
On Wed, 7 Jan 2026 15:35:54 GMT, Lance Andersen <lancea at openjdk.org> wrote:
>> Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision:
>>
>> use -1 to represent absence of a GZIP header, from readHeader() method
>
> src/java.base/share/classes/java/util/zip/GZIPInputStream.java line 260:
>
>> 258: }
>> 259: crc.reset();
>> 260: assert n > 0 : "incorrect number of header bytes: " + n;
>
> No problem with this but wondering if we should add this later and look at other places of interest
The new place where we return the -1 (representing EOF) is a bit far away from here, so I wanted to be sure that we only return positive values here. It's not too important though, and I just noticed that there aren't any other asserts in this file. So yes, I'll remove this from the PR and we can think of introducing it later if necessary.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29092#discussion_r2672118133
More information about the core-libs-dev
mailing list