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