mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
Merge
This commit is contained in:
commit
4616c13c2f
67 changed files with 1126 additions and 799 deletions
|
@ -3440,8 +3440,8 @@ loop: for(int x=0, offset=0; x<nCodePoints; x++, offset+=len) {
|
|||
private static final int countChars(CharSequence seq, int index,
|
||||
int lengthInCodePoints) {
|
||||
// optimization
|
||||
if (lengthInCodePoints == 1 && !Character.isHighSurrogate(seq.charAt(index))) {
|
||||
assert (index >= 0 && index < seq.length());
|
||||
if (lengthInCodePoints == 1 && index >= 0 && index < seq.length() &&
|
||||
!Character.isHighSurrogate(seq.charAt(index))) {
|
||||
return 1;
|
||||
}
|
||||
int length = seq.length();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue