RFR: 8372353: API to compute the byte length of a String encoded in a given Charset [v5]

Liam Miller-Cushon cushon at openjdk.org
Thu Jan 15 16:28:01 UTC 2026


On Thu, 15 Jan 2026 15:40:42 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> Liam Miller-Cushon has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update tests
>
> src/java.base/share/classes/java/lang/String.java line 2135:
> 
>> 2133:      * {@return the length in bytes of the given String encoded with the given {@link Charset}}
>> 2134:      *
>> 2135:      * <p>The result will be the same value as {@code getBytes(charset).length}.
> 
> Please @linkplain to the getBytes(cs) method.

Done, thanks

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28454#discussion_r2695088558


More information about the core-libs-dev mailing list