RFR: 8321514: UTF16 string gets constructed incorrectly from codepoints if CompactStrings is not enabled [v2]
Aleksei Voitylov
avoitylov at openjdk.org
Tue Dec 12 10:47:48 UTC 2023
> Since JDK-8311906, if CompactStrings is not enabled, index is not considered when calling extractCodepoints from StringUTF16.toBytes(). Because of that the last elements of the source codepoints array are stripped from the resulting UTF16 string, which fires in other places (e.g. during RegEx processing).
>
> The fix replaces len in extractCodepoints parameters with end that is index + len.
Aleksei Voitylov has updated the pull request incrementally with one additional commit since the last revision:
review comments
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/17057/files
- new: https://git.openjdk.org/jdk/pull/17057/files/50c09846..759068e8
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=17057&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=17057&range=00-01
Stats: 70 lines in 2 files changed: 24 ins; 45 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/17057.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17057/head:pull/17057
PR: https://git.openjdk.org/jdk/pull/17057
More information about the core-libs-dev
mailing list