ICU-8175 Added note to clarify that j-1 is safe.
X-SVN-Rev: 29546
This commit is contained in:
parent
8f2a1ed97c
commit
b55bbd25a9
@ -275,6 +275,7 @@ public class CharSequences {
|
||||
if (cp >= 0xDC00 && cp <= 0xDFFF && i != 0 ) { // hand-code for speed
|
||||
char last = (char) result[j-1];
|
||||
if (last >= 0xD800 && last <= 0xDBFF) {
|
||||
// Note: j-1 is safe, because j can only be zero if i is zero. But i!=0 in this block.
|
||||
result[j-1] = Character.toCodePoint(last, cp);
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user