Re: RFR: 8321514: UTF16 string gets constructed incorrectly from codepoints if CompactStrings is not enabled [v2]

2023-12-13 Thread Aleksei Voitylov
On Tue, 12 Dec 2023 19:11:43 GMT, Roger Riggs wrote: >> Aleksei Voitylov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> review comments > > test/jdk/java/lang/String/Chars.java line 50: > >> 48: testChars(cc, ccExp); >>

Re: RFR: 8321514: UTF16 string gets constructed incorrectly from codepoints if CompactStrings is not enabled [v2]

2023-12-12 Thread Roger Riggs
On Tue, 12 Dec 2023 10:57:20 GMT, Aleksei Voitylov wrote: >> Aleksei Voitylov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> review comments > > Thanks Roger. I agree with your point and pulled your suggested test in the > PR.

Re: RFR: 8321514: UTF16 string gets constructed incorrectly from codepoints if CompactStrings is not enabled [v2]

2023-12-12 Thread Roger Riggs
On Tue, 12 Dec 2023 10:47:48 GMT, Aleksei Voitylov 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 >>

Re: RFR: 8321514: UTF16 string gets constructed incorrectly from codepoints if CompactStrings is not enabled [v2]

2023-12-12 Thread Aleksei Voitylov
On Tue, 12 Dec 2023 10:47:48 GMT, Aleksei Voitylov 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 >>

Re: RFR: 8321514: UTF16 string gets constructed incorrectly from codepoints if CompactStrings is not enabled [v2]

2023-12-12 Thread Aleksei Voitylov
> 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