RFR: 4800398: (ch spec) Clarify Channels.newChannel(InputStream) spec [v2]
Brian Burkhalter
bpb at openjdk.org
Fri Jul 21 15:44:45 UTC 2023
On Fri, 21 Jul 2023 06:32:10 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 4800398: Revise verbiage update per Reviewer suggestion
>
> src/java.base/share/classes/java/nio/channels/Channels.java line 264:
>
>> 262: * <p> The resulting channel will be in blocking mode and will not be
>> 263: * buffered; it will simply redirect its I/O operations to the given stream.
>> 264: * Closing the channel will in turn cause the stream to be closed. </p>
>
> ReadableByteChannel doesn't have any notion of blocking mode so might be confusing to say that it returns a channel in blocking mode. Maybe it would be simpler to just insert a sentence into the paragraph to say that reading from the resulting channel will read (and therefore might block reading) from the input stream?
Changed as suggested in dba2d33.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14961#discussion_r1270824218
More information about the nio-dev
mailing list