RFR: 8136895: Writer not closed with disk full error, file resource leaked [v4]
Daniel Jeliński
djelinski at openjdk.org
Mon Jul 17 06:11:24 UTC 2023
On Fri, 14 Jul 2023 22:16:11 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> In`StreamEncoder::implClose`, move `flushLeftoverChar()` inside the `try` block and the closing of the underlying stream inside the `finally` block.
>
> Brian Burkhalter has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains seven additional commits since the last revision:
>
> - 8136895: Simplify change to implClose()
> - Merge
> - 8136895: Tweak to StreamEncoder::implCose
> - 8136895: Small improvements to StreamEncoderClose test
> - 8136895: Trivial formatting corrections in tests
> - 8136895: Do not swallow exceptions in StreamEncoder::implFlush; add test for OutputStreamWriter; rename test for Channels::newWriter"
> - 8136895: Writer not closed with disk full error, file resource leaked
Can you remove the explicit calls to `close()`? The underlying stream/channel is now closed twice in the no-exception case.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/13503#issuecomment-1637433281
More information about the nio-dev
mailing list