COV.CMPError exists when method compareTo declared with signature different than int compareTo(Object). Vulnerability and riskIntent 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 preventionDeclare that class implements Comparable, declare int compareTo(Object) method. Example 114 String name; 15 int compareTo(MyClass a) { 16 return name.compareTo(a.name); 17 } COV.CMP is reported for line 15: Method compareTo(..) should have signature 'public int compareTo(Object)' |