On Wed, 7 Jan 2026 15:35:54 GMT, Lance Andersen <[email protected]> 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

Reply via email to