diff --git a/src/share/classes/java/lang/String.java b/src/share/classes/java/lang/String.java index ce7d8f779d5303d9001d7aee15de516c32dac1fb..483d1c68dd4972ca5b08be51cc68f555c34dad86 100644 --- a/src/share/classes/java/lang/String.java +++ b/src/share/classes/java/lang/String.java @@ -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;