<i18n dev> RFR: 8364007: Add no-argument codePointCount method to CharSequence and String [v23]
Naoto Sato
naoto at openjdk.org
Tue Feb 3 16:53:34 UTC 2026
On Tue, 3 Feb 2026 11:59:21 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Tatsunori Uchino has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Add comment
>> - Fix logic error
>
> src/java.base/share/classes/java/lang/String.java line 1886:
>
>> 1884: * @since 27
>> 1885: */
>> 1886: public int codePointCount() {
>
> Are you planning to override the API docs here to say that it returns the number of Unicode code points in this String? That would get the API docs consistent with the existing 3-arg codePointCount and avoid referencing the String as a character sequence in the String docs.
That was my suggestion to remove the text, as the generated javadoc apparently shows the text is from CharSequence. It sure does replacing the CharSequence with String aligns with the other method, but it also introduces copying the almost identical text, which could introduce editorial left over if CharSequence text changes.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26461#discussion_r2760034348
More information about the i18n-dev
mailing list