8343925: [BACKOUT] JDK-8342650 Move getChars to DecimalDigits

Reviewed-by: jpai, alanb, liach
This commit is contained in:
Shaojin Wen 2024-11-11 15:14:10 +00:00
parent 0759224edc
commit b0a371b085
12 changed files with 376 additions and 405 deletions

View file

@ -23,8 +23,6 @@
package java.lang;
import jdk.internal.util.DecimalDigits;
/**
* A helper class to get access to package-private members
*/
@ -119,17 +117,11 @@ public class Helper {
}
public static int getChars(int i, int begin, int end, byte[] value) {
StringUTF16.checkBoundsBeginEnd(begin, end, value);
int pos = DecimalDigits.getCharsUTF16(i, end, value);
assert begin == pos;
return pos;
return StringUTF16.getChars(i, begin, end, value);
}
public static int getChars(long l, int begin, int end, byte[] value) {
StringUTF16.checkBoundsBeginEnd(begin, end, value);
int pos = DecimalDigits.getCharsUTF16(l, end, value);
assert begin == pos;
return pos;
return StringUTF16.getChars(l, begin, end, value);
}
public static boolean contentEquals(byte[] v1, byte[] v2, int len) {