On Thu, 22 Jun 2023 19:00:58 GMT, Brian Burkhalter <b...@openjdk.org> wrote:

>> src/java.base/share/classes/java/lang/Readable.java line 49:
>> 
>>> 47:      * @param cb the buffer to read characters into
>>> 48:      * @return The number of {@code char} values added to the buffer,
>>> 49:      *         possibly zero, or -1 if this source of characters is at 
>>> its end
>> 
>> Would it be clearer to specifically indicate 0 is returned when no 
>> characters will be read.
>
> Might be. I was mimicking the return specification from 
> [FileChannel::read](https://docs.oracle.com/en/java/javase/20/docs/api/java.base/java/nio/channels/FileChannel.html#read(java.nio.ByteBuffer[],int,int)).

Consistency is probably good I guess in this case, though specifying `zero` vs 
`0` seems inconsistent when we specify `-1` as I believe this varies throughout 
the javadoc.  But it matches the other javadoc so we are at least consistent 
(somewhat )

OK for now by me

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14616#discussion_r1238935203

Reply via email to