On Mon, 18 Aug 2025 21:34:39 GMT, Roger Riggs <rri...@openjdk.org> wrote:

> Refactor uses of JLAuncheckedNewStringNoRepl(byte[], ISO_8859_1) adding 
> JLA.uncheckedNewStringWithLatin1Bytes(byte[]).
> There is no decoding needed, and no exceptions expected or thrown when 
> creating the string from the supplied latin1 bytes. 
> If COMPACT_STRINGS is false, the bytes are inflated to UTF16.

src/java.base/share/classes/java/lang/String.java line 773:

> 771: 
> 772:         if (COMPACT_STRINGS)
> 773:             return new String(src, LATIN1);

small suggestion: add braces around the return statement

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26831#discussion_r2286047919

Reply via email to