mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8343925: [BACKOUT] JDK-8342650 Move getChars to DecimalDigits
Reviewed-by: jpai, alanb, liach
This commit is contained in:
parent
0759224edc
commit
b0a371b085
12 changed files with 376 additions and 405 deletions
|
@ -462,11 +462,11 @@ public final class Long extends Number
|
|||
int size = DecimalDigits.stringSize(i);
|
||||
if (COMPACT_STRINGS) {
|
||||
byte[] buf = new byte[size];
|
||||
DecimalDigits.getCharsLatin1(i, size, buf);
|
||||
StringLatin1.getChars(i, size, buf);
|
||||
return new String(buf, LATIN1);
|
||||
} else {
|
||||
byte[] buf = new byte[size * 2];
|
||||
DecimalDigits.getCharsUTF16(i, size, buf);
|
||||
StringUTF16.getChars(i, size, buf);
|
||||
return new String(buf, UTF16);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue