EqualsNaN
== NaN always returns false; use the isNaN methods instead

Severity
ERROR

The problem

As per JLS 15.21.1, == NaN comparisons always return false, even NaN == NaN. Instead, use the isNaN methods to check for NaN.

Suppression

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