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

Sean Coffey coffeys at openjdk.java.net
Tue Oct 12 14:39:51 UTC 2021


On Tue, 12 Oct 2021 14:10:53 GMT, jmehrens <duke at openjdk.java.net> 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 line 252:
> 
>> 250:         int len = def.deflate(buf, 0, buf.length);
>> 251:         if (len > 0) {
>> 252:             try {
> 
> Shouldn't this use try with resources:
> try (out) { ...

the output stream is only closed if an exception is raised though ?

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

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


More information about the core-libs-dev mailing list