IdentityBinaryExpression
A binary expression where both operands are the same is usually incorrect.

Category
JDK
Severity
ERROR
Maturity

Alternate names: SelfEquality

The problem

a && a, a || a, a & a, or a | a
equivalent to a
a <= a, a >= a, or a == a
always true
a < a, a > a, a != a, or a ^ a
always false
a / a
always 1
a % a or a - a
always `0

Suppression

Suppress false positives by adding an @SuppressWarnings("IdentityBinaryExpression") annotation to the enclosing element.