RFR: JDK-8272192 Shortcut String equality checks by checking equality of the value array

liach github.com+7806504+liach at openjdk.java.net
Sat Sep 4 12:54:50 UTC 2021


On Sat, 4 Sep 2021 11:59:58 GMT, q2q-2q2 <github.com+44376158+q2q-2q2 at openjdk.org> wrote:

> Shortcut String equality checks by checking equality of the value array

src/java.base/share/classes/java/lang/String.java line 1964:

> 1962:     public boolean equalsIgnoreCase(String anotherString) {
> 1963:         if (anotherString != null) {
> 1964:             return false;

This one is definitely wrong.

-------------

PR: https://git.openjdk.java.net/jdk/pull/5370


More information about the core-libs-dev mailing list