mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8321514: UTF16 string gets constructed incorrectly from codepoints if CompactStrings is not enabled
Co-authored-by: Roger Riggs <rriggs@openjdk.org> Reviewed-by: rriggs
This commit is contained in:
parent
45a9ade337
commit
fde5b16817
2 changed files with 27 additions and 2 deletions
|
@ -415,7 +415,7 @@ final class StringUTF16 {
|
|||
int n = computeCodePointSize(val, index, end);
|
||||
|
||||
byte[] buf = newBytesFor(n);
|
||||
return extractCodepoints(val, index, len, buf, 0);
|
||||
return extractCodepoints(val, index, end, buf, 0);
|
||||
}
|
||||
|
||||
public static byte[] toBytes(char c) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue