RFR: 8364007: Add no-argument codePointCount method to CharSequence and String [v4]

Tatsunori Uchino duke at openjdk.org
Mon Jan 26 23:58:14 UTC 2026


On Mon, 26 Jan 2026 23:53:06 GMT, Naoto Sato <naoto at openjdk.org> wrote:

>> Tatsunori Uchino has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Improve JavaDoc
>>   
>>   Co-authored-by: Chen Liang <liach at openjdk.org>
>
> src/java.base/share/classes/java/lang/Character.java line 10004:
> 
>> 10002:     /**
>> 10003:      * {@return the number of Unicode code points in the {@code char} array}
>> 10004:      * Unpaired surrogates count as one code point each.
> 
> It'd be better to replace "surrogates" with "surrogate code units." Applies to other method descriptions too.

Agree. I have personally disliked the expression "surrogate" for such code units. We will need another tickets for JavaDoc for the other methods that are not concerned with this ticket.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26461#discussion_r2729723123


More information about the core-libs-dev mailing list