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

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


On Thu, 15 Jan 2026 20:23:55 GMT, Naoto Sato <naoto at openjdk.org> wrote:

>> I think that makes sense, I'm not sure what the best way to characterize it is. Probably we don't want to promise specific optimizations. What do you think about:
>> 
>> 
>>      * <p>The result will be the same value as {@link #getBytes(Charset) getBytes(cs).length},
>>      * and will have equivalent or better performance.
>
> I think this won't be a normative spec, so I'd move the performance description to `@apiNote`

Done

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

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


More information about the core-libs-dev mailing list