On Tue, 12 Oct 2021 14:35:17 GMT, Sean Coffey <[email protected]> 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