RFR: 8136895: Writer not closed with disk full error, file resource leaked [v2]

Alan Bateman alanb at openjdk.org
Fri Apr 21 10:56:44 UTC 2023


On Tue, 18 Apr 2023 19:51:03 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 incrementally with one additional commit since the last revision:
> 
>   8136895: Do not swallow exceptions in StreamEncoder::implFlush; add test for OutputStreamWriter; rename test for Channels::newWriter"

Sill mulling over this one as there is flushing at different levels. There may be left overs chars that need to be flushed, then we have flushing of the underlying output stream for cases where an OutputStreamWriter is built on an output stream that has buffering too.  So I think it looks okay, I'm just wondering if we have missed anything.

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

PR Comment: https://git.openjdk.org/jdk/pull/13503#issuecomment-1517646782


More information about the nio-dev mailing list