mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8160312: ArrayIndexOutOfBoundsException when comparing strings case insensitive
Reviewed-by: rriggs
This commit is contained in:
parent
396d6f6285
commit
6223e843f9
2 changed files with 7 additions and 3 deletions
|
@ -137,8 +137,8 @@ final class StringLatin1 {
|
|||
char c1 = (char) CharacterDataLatin1.instance.toUpperCase(getChar(value, k));
|
||||
char c2 = (char) CharacterDataLatin1.instance.toUpperCase(getChar(other, k));
|
||||
if (c1 != c2) {
|
||||
c1 = (char) CharacterDataLatin1.instance.toLowerCase(c1);
|
||||
c2 = (char) CharacterDataLatin1.instance.toLowerCase(c2);
|
||||
c1 = Character.toLowerCase(c1);
|
||||
c2 = Character.toLowerCase(c2);
|
||||
if (c1 != c2) {
|
||||
return c1 - c2;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue