CWE-597: Use of Wrong Operator in String Comparison
Use of Wrong Operator in String Comparison
Weakness ID: 597 (Weakness Variant)
Status: Draft
Description
Description Summary
The product uses the wrong operator when comparing a string,
such as using "==" when the equals() method should be used
instead.
Extended Description
Using == or != to compare two strings for equality actually compares two
objects for equality, not their values. Chances are good that the two
references will never be equal.