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.
Suppress false positives by adding the suppression annotation @SuppressWarnings("SelfComparison")
to the enclosing element.