...
Use reference equality to determine whether two references point to the same object.
Automated Detection
Tool | Version | Checker | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
The Checker Framework |
| Interning Checker | Check for errors in equality testing and interning (see Chapter 5) |
Parasoft Jtest |
| CERT.EXP50.UEIC | Do not use '==' or '!=' to compare objects | ||||||
SonarQube |
|
|
| S1698 |
Bibliography
[Bloch 2008] | Item 69, "Prefer Concurrency Utilities to wait and notify " |
ES, "Comparison of String Objects Using | |
[JLS 2013] | §3.10.5, "String Literals" |
...
...