RFR: 8321514: UTF16 string gets constructed incorrectly from codepoints if CompactStrings is not enabled [v3]
Roger Riggs
rriggs at openjdk.org
Wed Dec 13 14:48:41 UTC 2023
On Wed, 13 Dec 2023 11:39:19 GMT, Aleksei Voitylov <avoitylov at openjdk.org> wrote:
>> 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
I'll keep an eye out for the backport to jdk 21 if a review is needed for that.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17057#issuecomment-1854050370
More information about the core-libs-dev
mailing list