RFR: 4619075: (ch) newChannel() should return Gathering/ScatteringByteChannel
Alan Bateman
alanb at openjdk.java.net
Wed Oct 13 07:17:52 UTC 2021
On Wed, 13 Oct 2021 02:04:37 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> Modify `Channels.newChannel(InputStream)` and `Channels.newChannel(OutputStream)` to return `ScatteringByteChannel` and `GatheringByteChannel`, respectively.
src/java.base/share/classes/java/nio/channels/Channels.java line 271:
> 269: * @return A new readable byte channel
> 270: */
> 271: public static ScatteringByteChannel newChannel(InputStream in) {
This looks like a binary incompatible change, are you sure that existing code won't fail at runtime with NoSuchMethodError?
-------------
PR: https://git.openjdk.java.net/jdk/pull/5922
More information about the nio-dev
mailing list