RFR: 8222329: Readable read(CharBuffer) does not specify that 0 is returned when there is no remaining space in buffer
Brian Burkhalter
bpb at openjdk.org
Thu Jun 22 19:42:02 UTC 2023
On Thu, 22 Jun 2023 18:22:35 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> Clarify the behavior of `java.lang.Readable` when the specified `java.nio.CharBuffer` parameter is empty but read-only, and when it is full.
src/java.base/share/classes/java/io/Reader.java line 193:
> 191: * changes made are the results of a put operation. No flipping or
> 192: * rewinding of the buffer is performed. If the specified character
> 193: * buffer is full, then no characters will be read and zero will be
Instead of "is full" here, it would be more consistent to state "has no remaining elements".
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14616#discussion_r1238953679
More information about the nio-dev
mailing list