Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Parasoft Jtest 2022.2

...

Use reference equality to determine whether two references point to the same object.

Automated Detection

ToolVersionCheckerDescription
The Checker Framework

Include Page
The Checker Framework_V
The Checker Framework_V

Interning CheckerCheck for errors in equality testing and interning (see Chapter 5)
Parasoft Jtest
Include Page
Parasoft_V
Parasoft_V
CERT.EXP50.UEICDo not use '==' or '!=' to compare objects
SonarQube
Include Page
SonarQube_V
SonarQube_V
S1698
 

Bibliography

[Bloch 2008]Item 69, "Prefer Concurrency Utilities to wait and notify"

[FindBugs 2008]

ES, "Comparison of String Objects Using == or !="

[JLS 2013]

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

...


...