On Tue, 26 Oct 2021 06:30:39 GMT, Ravi Reddy <rre...@openjdk.org> wrote:

>> Hi all,
>> 
>> Please review this fix for Infinite loop in ZipOutputStream.close().
>> The main issue here is when ever there is an exception during close 
>> operations on GZip we are not setting the deflator to a finished state which 
>> is leading to an infinite loop when we try writing on the same GZip 
>> instance( since we use while(!def.finished()) inside the write operation).
>> 
>> Thanks,
>> Ravi
>
> Ravi Reddy has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   8193682 : Infinite loop in ZipOutputStream.close()

Hi ,

I have made the changes in fix , I think changing existing behavior in 
deflate() will need a spec change. 
With this fix , I'm closing deflater on exception scenarios in finish method of 
GZipOutputStream and close method of DeflaterOutputStream. Even though the 
document for finsih/close methods does not clearly specifies if the deflater 
will be closed or not , the current behaviour of these methods does close the 
deflater whenever finish/close are called.  \

Thanks,
Ravi

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

PR: https://git.openjdk.java.net/jdk/pull/5522

Reply via email to