8065262: (bf spec) CharBuffer.chars() should make it clearer that the sequence starts from the buffer position
Brian Burkhalter
brian.burkhalter at oracle.com
Fri Feb 15 16:10:31 UTC 2019
> On Feb 15, 2019, at 1:06 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
>
> On 14/02/2019 22:36, Brian Burkhalter wrote:
>> https://bugs.openjdk.java.net/browse/JDK-8065262 <https://bugs.openjdk.java.net/browse/JDK-8065262>
>>
>> One possibility would be to update the class level specification as
>>
>> To clear this up, perhaps a sentence could merely be added to the specification of CharBuffer in X-Buffer.java.template:
>>
>> #if[char]
>> *
>> * <p> This class implements the {@link CharSequence} interface so that
>> * character buffers may be used wherever character sequences are accepted, for
>> * example in the regular-expression package {@link java.util.regex}.
>> + * {@code CharSequence} methods operate relative to the current position of
>> + * the buffer when they are invoked.
>> * </p>
>> *
>> #end[char]
>>
> I agree that adding a statement class description will help (and avoid bug reports like this). Your looks okay and is consistent with the wording in the method description. A small suggestion is to start with "The methods defined by CharSequence ...".
All right, I’ll update the wording per your suggestion and file a CSR.
Thanks,
Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/nio-dev/attachments/20190215/87ad91d5/attachment.html>
More information about the nio-dev
mailing list