Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Related Guidelines

MITRE CWE

CWE ID -595, Comparison of object references instead of object contents
CWE ID -597, Use of wrong operator in string comparison

[Rogue 2000]

Rule 79, Use equals(), not ==, to test for equality of objects

...

[FindBugs 2008]

ES: Comparison of String objects using Objects Using == or !=

[JLS 2011]

§3.10.5, "String Literals"
§5.6.2, "Binary Numeric Promotion"

...