Inputs on patch for JDK-8225763?

Jaikiran Pai jai.forums2013 at gmail.com
Fri Jun 28 04:20:06 UTC 2019


Hello Alan,

On 27/06/19 4:22 PM, Alan Bateman wrote:
> On 27/06/2019 11:16, Remi Forax wrote:
>> Is a boolean isEnded that records if end() was already called is not
>> enough ?
>>
> I'm sure Jaikiran will create tests that cover the different
> combinations of overriding end and close. It might enough for close to
> check if zsRef.address is 0.

Given that end() (in both Inflater and Deflater) can be overridden, and
the fact the javadoc of the end() doesn't mention any explicit
guarantees of the underlying state (zsRef.address for example), do you
think using something like a boolean "closed" flag (similar to what Remi
suggested) would be more robust?

-Jaikiran


More information about the core-libs-dev mailing list