8060485: (str) contentEquals checks the String contents twice on mismatch
Reviewed-by: martin, chegar, alanb
This commit is contained in:
parent
aa48d0f22b
commit
c25af2a638
@ -1045,8 +1045,9 @@ public final class String
|
||||
}
|
||||
}
|
||||
// Argument is a String
|
||||
if (cs.equals(this))
|
||||
return true;
|
||||
if (cs instanceof String) {
|
||||
return equals(cs);
|
||||
}
|
||||
// Argument is a generic CharSequence
|
||||
char v1[] = value;
|
||||
int n = v1.length;
|
||||
|
Loading…
x
Reference in New Issue
Block a user