On Wed, 25 Feb 2026 16:39:45 GMT, Roger Riggs <[email protected]> wrote:

>> Liam Miller-Cushon has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Rename getBytesLength to getByteLength
>
> src/java.base/share/classes/java/lang/String.java line 2119:
> 
>> 2117:      * @since 27
>> 2118:      */
>> 2119:     public int getByteLength(Charset cs) {
> 
> `getEncodedLength(Charset cs)` is a stronger name, more evocative of the 
> value being computed.
> The name should not rely on the argument to hint at its primary function.

Or `encodedLength` to be consistent with the other queries.

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

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

Reply via email to