RFR: 4619075: (ch) newChannel() should return Gathering/ScatteringByteChannel [v3]
Brian Burkhalter
bpb at openjdk.java.net
Thu Oct 14 14:57:48 UTC 2021
On Wed, 13 Oct 2021 21:05:26 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> Modify `Channels.newChannel(InputStream)` and `Channels.newChannel(OutputStream)` to return `ScatteringByteChannel` and `GatheringByteChannel`, respectively.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>
> 4619075: Add @since tags to new methods
One other possibility I had thought of was to change `newChannel(InputStream)` and `newChannel(OutputStream)` to respectively return a `ScatteringByteChannel` and a `GatheringByteChannel` without changing the return types of the methods from their current declarations and instead calling out what is in fact returned in the javadoc.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5922
More information about the nio-dev
mailing list