Java defines equality operators ==
and !=
and relational operators such as <=,>=,>,<
. When it comes to string object reference comparisons, these manifest as traps that an amateur programmer may unintentionally fall victim to.
...
Noncompliant Code Example
For ==
to return true
for two string references, they must point to the same underlying object. This non-compliant noncompliant example declares two different string objects with the same values, however, they compare unequal since they constitute different object references.
...
Rule | Severity | Likelihood | Remediation Cost | Priority | Level | |
---|---|---|---|---|---|---|
EXP03-J | low | unlikely | medium | P?? | P2 | L3 L?? |
Automated Detection
TODO
Related Vulnerabilities
...