Error exists when method compareTo declared with signature different than int compareTo(Object).

Vulnerability and risk

Intent was probably to implement interface method of Comparable interface, but since this method has different signature it is not same method and will not be called when comparator is used.

Mitigation and prevention

Declare that class implements Comparable, declare int compareTo(Object) method.

Example 1

         String name;
         int compareTo(MyClass a) {
             return name.compareTo(;

COV.CMP is reported for line 15: Method compareTo(..) should have signature 'public int compareTo(Object)'