RFR: 8306308: (ch) Writer created by Channels::newWriter may lose data [v8]
Daniel Jeliński
djelinski at openjdk.org
Fri Oct 20 17:38:35 UTC 2023
On Fri, 20 Oct 2023 16:58:12 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> Change `Channels.newWriter` to return a `Writer` created by first wrapping the `WritableByteChannel` in an `OutputStream` using `Channels.newOutputStream` and then wrapping the result in an `OutputStreamWriter`. With this change in place, the problems reported in the issue do not occur.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>
> 8306308: Really fix test
test/jdk/java/nio/channels/Channels/NewWriter.java line 76:
> 74: writer.flush();
> 75: System.out.println(i);
> 76: actual++;
incrementing `actual` here feels weird; could you remove this, and adjust EXPECTED instead?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16207#discussion_r1367319545
More information about the nio-dev
mailing list