Re: RFR: 8193682: Infinite loop in ZipOutputStream.close() [v3]

2021-10-12 Thread Sean Coffey
On Tue, 12 Oct 2021 14:46:33 GMT, Alan Bateman wrote: >> src/java.base/share/classes/java/util/zip/DeflaterOutputStream.java line 256: >> >>> 254: } catch (Exception e) { >>> 255: def.end(); >>> 256: out.close(); >> >> out.close not needed with try

Re: RFR: 8193682: Infinite loop in ZipOutputStream.close() [v3]

2021-10-12 Thread Alan Bateman
On Tue, 12 Oct 2021 13:28:21 GMT, Ravi Reddy 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 >>

Re: RFR: 8193682: Infinite loop in ZipOutputStream.close() [v3]

2021-10-12 Thread Ravi Reddy
On Tue, 12 Oct 2021 14:35:17 GMT, Sean Coffey wrote: >> src/java.base/share/classes/java/util/zip/DeflaterOutputStream.java line 252: >> >>> 250: int len = def.deflate(buf, 0, buf.length); >>> 251: if (len > 0) { >>> 252: try { >> >> Shouldn't this use try with

Re: RFR: 8193682: Infinite loop in ZipOutputStream.close() [v3]

2021-10-12 Thread Ravi Reddy
On Tue, 12 Oct 2021 15:00:11 GMT, Ravi Reddy wrote: >> the output stream is only closed if an exception is raised though ? > > Yes , we are closing the stream only when exception occurs during write > operation Yes, we are closing the stream only when an exception occurs during a write

Re: RFR: 8193682: Infinite loop in ZipOutputStream.close() [v3]

2021-10-12 Thread Alan Bateman
On Tue, 12 Oct 2021 14:11:15 GMT, jmehrens wrote: >> Ravi Reddy has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8193682 : Infinite loop in ZipOutputStream.close() > > src/java.base/share/classes/java/util/zip/DeflaterOutputStream.java

Re: RFR: 8193682: Infinite loop in ZipOutputStream.close() [v3]

2021-10-12 Thread Sean Coffey
On Tue, 12 Oct 2021 14:10:53 GMT, jmehrens wrote: >> Ravi Reddy has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8193682 : Infinite loop in ZipOutputStream.close() > > src/java.base/share/classes/java/util/zip/DeflaterOutputStream.java

Re: RFR: 8193682: Infinite loop in ZipOutputStream.close() [v3]

2021-10-12 Thread Sean Coffey
On Tue, 12 Oct 2021 13:28:21 GMT, Ravi Reddy 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 >>

Re: RFR: 8193682: Infinite loop in ZipOutputStream.close() [v3]

2021-10-12 Thread jmehrens
On Tue, 12 Oct 2021 13:28:21 GMT, Ravi Reddy 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 >>

Re: RFR: 8193682: Infinite loop in ZipOutputStream.close() [v3]

2021-10-12 Thread Ravi Reddy
> 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