OptionalEquality
Comparison using reference equality instead of value equality

Severity
ERROR
Has Fix?
NO_FIX

The problem

Optionals should be compared for value equality using .equals(), and not for reference equality using == and !=.

Suppression

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