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:45:40 UTC 2023


On Wed, 13 Dec 2023 11:39:29 GMT, Aleksei Voitylov <avoitylov at openjdk.org> wrote:

> If you think it's worth it, I can go through some tests and add some more -XX:-CompactStrings mode to java.lang.String tests here and there, lightly. It's not the first time we hit this issue.

Verifying the coverage of the tests would be useful. I noticed in many tests of the API signatures that include offset and length, the offset is frequently zero.

As for -XX:-CompactStrings, it was originally a precaution about backward compatibility. From time to time it comes up to consider simplifying the code to remove it. It would be good to know the use cases where it is needed and the rationale.

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

PR Comment: https://git.openjdk.org/jdk/pull/17057#issuecomment-1854045141


More information about the core-libs-dev mailing list