RFR: 8365719: Refactor uses of JLA.uncheckedNewStringNoRepl

Volkan Yazici vyazici at openjdk.org
Tue Aug 19 17:07:36 UTC 2025


On Mon, 18 Aug 2025 21:34:39 GMT, Roger Riggs <rriggs at 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.

Verified

* All `uncheckedNewStringNoRepl` call-sites
* All `uncheckedNewStringWithLatin1Bytes` call-sites provide valid Latin-1 `byte[]`
* New `newStringWithLatin1Bytes` is a verbatim copy of the relevant sections from `newStringNoRepl1`, which provides `newStringNoRepl`
* Copyright year bumps

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

Marked as reviewed by vyazici (Committer).

PR Review: https://git.openjdk.org/jdk/pull/26831#pullrequestreview-3133151566


More information about the core-libs-dev mailing list