RFR: 7036144: GZIPInputStream readTrailer uses faulty available() test for end-of-stream [v4]

Archie Cobbs acobbs at openjdk.org
Sat Dec 16 17:51:36 UTC 2023


On Sat, 16 Dec 2023 05:53:34 GMT, Bernd <duke at openjdk.org> wrote:

> I wonder: if the stream does no longer depend on this `available()` condition to be true, does that mean it’s no longer (indirectly) verified?

I'm not sure I understand ... what do you mean by "verified"?

If what you're saying is "Previously we were implicitly verifying that the data reported by `available()` was actually there, and now we're no longer verifying that" then that's not correct. The code that was previously conditional on an `available()` check was just catching and discarding `IOException`, so even if `available()` was lying before, that would not have ever been detected.

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

PR Comment: https://git.openjdk.org/jdk/pull/17113#issuecomment-1858883789


More information about the core-libs-dev mailing list