RFR: 8136895: Writer not closed with disk full error, file resource leaked [v2]
Andrey Turbanov
aturbanov at openjdk.org
Wed Apr 19 19:18:46 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"
test/jdk/java/nio/channels/Channels/CloseWriterOnFailedFlush.java line 50:
> 48: (channel, StandardCharsets.UTF_8.newEncoder(), -1 )) {
> 49: writer.write(s);
> 50: } catch(IOException ex) {
nit
Suggestion:
} catch (IOException ex) {
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13503#discussion_r1171757406
More information about the nio-dev
mailing list