...
Static detection of calls to to Object.equals()
is straightforward. However, it is not always possible to statically resolve the class of a method invocation's target. Consequently, it may not always be possible to determine when Object.equals()
is invoked for an array type.
Tool | Version | Checker | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CodeSonar |
| FB.CORRECTNESS.EC_BAD_ARRAY_COMPARE | Invocation of equals() on an array, which is equivalent to == | JAVA.COMPARE.EQ | Should Use equals() Instead of == (Java) | ||||||
Coverity | 7.5 | BAD_EQ | Implemented | ||||||||
Parasoft Jtest |
| PBCERT.CUBEXP02.UEIC | Do not use '==' or '!=' to compare objects | ||||||||
SonarQube |
| S2159 | Silly equality checks should not be made |
...