SelfComparison
An object is compared to itself

Severity
ERROR

The problem

The arguments to compareTo method are the same object, so it always returns 0. Either change the arguments to point to different objects or substitute 0.

Suppression

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