Is a boolean isEnded that records if end() was already called is not enough ?

Rémi

----- Mail original -----
> De: "Alan Bateman" <alan.bate...@oracle.com>
> À: "Jaikiran Pai" <jai.forums2...@gmail.com>, "core-libs-dev" 
> <core-libs-dev@openjdk.java.net>
> Envoyé: Jeudi 27 Juin 2019 09:13:41
> Objet: Re: Inputs on patch for JDK-8225763?

> On 27/06/2019 05:28, Jaikiran Pai wrote:
>> :
>>
>> 2. Have the close() method call the end() method
>>
> One subtle point is that end() is not idempotent. The close() method
> defined by AutoCloseable is not required be to either but we should try
> hard to specify Inflater::close to be idempotent. It might need a bit of
> heroics to get this right because Inflater is not final and end() might
> be overridden.
> 
> -Alan

Reply via email to