RFR: 8306308: (ch) Writer created by Channels::newWriter may lose data [v2]

Brian Burkhalter bpb at openjdk.org
Wed Oct 18 01:01:27 UTC 2023


> 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 two additional commits since the last revision:

 - 8306308: Remove WritableByteChannel support from StreamEncoder
 - 8306308: new OutputStreamWriter -> StreamEncoder.forOutputStreamWriter

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/16207/files
  - new: https://git.openjdk.org/jdk/pull/16207/files/808dc885..1d8a667c

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=16207&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16207&range=00-01

  Stats: 41 lines in 2 files changed: 2 ins; 35 del; 4 mod
  Patch: https://git.openjdk.org/jdk/pull/16207.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/16207/head:pull/16207

PR: https://git.openjdk.org/jdk/pull/16207


More information about the nio-dev mailing list