On Mon, 11 Dec 2023 13:48:18 GMT, Aleksei Voitylov <[email protected]> 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. This pull request has now been integrated. Changeset: fde5b168 Author: Aleksei Voitylov <[email protected]> Committer: Roger Riggs <[email protected]> URL: https://git.openjdk.org/jdk/commit/fde5b16817c3263236993f2e8c2d2469610d99bd Stats: 27 lines in 2 files changed: 25 ins; 0 del; 2 mod 8321514: UTF16 string gets constructed incorrectly from codepoints if CompactStrings is not enabled Co-authored-by: Roger Riggs <[email protected]> Reviewed-by: rriggs ------------- PR: https://git.openjdk.org/jdk/pull/17057
