RFR: 8193682: Infinite loop in ZipOutputStream.close() [v3]
Ravi Reddy
rreddy at openjdk.java.net
Tue Oct 12 15:03:48 UTC 2021
On Tue, 12 Oct 2021 14:35:17 GMT, Sean Coffey <coffeys at openjdk.org> 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 resources:
>> try (out) { ...
>
> 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
-------------
PR: https://git.openjdk.java.net/jdk/pull/5522
More information about the core-libs-dev
mailing list