Package edu.umd.cs.findbugs
Class SloppyBugComparator
- java.lang.Object
-
- edu.umd.cs.findbugs.SloppyBugComparator
-
- All Implemented Interfaces:
WarningComparator,java.io.Serializable,java.util.Comparator<BugInstance>
public class SloppyBugComparator extends java.lang.Object implements WarningComparator
Very sloppy bug comparator: if the warnings are of the same type, and in the same class/method/field, assume they are the same.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private ClassNameRewriterclassNameRewriterprivate static booleanDEBUG
-
Constructor Summary
Constructors Constructor Description SloppyBugComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(BugInstance lhs, BugInstance rhs)private intcompareClassesAllowingNull(ClassAnnotation lhs, ClassAnnotation rhs)Compare class annotations.private intcompareFieldsAllowingNull(FieldAnnotation lhs, FieldAnnotation rhs)private intcompareMethodsAllowingNull(MethodAnnotation lhs, MethodAnnotation rhs)private intcompareNullElements(java.lang.Object lhs, java.lang.Object rhs)private FieldAnnotationconvertField(FieldAnnotation fieldAnnotation)private MethodAnnotationconvertMethod(MethodAnnotation methodAnnotation)voidsetClassNameRewriter(ClassNameRewriter classNameRewriter)
-
-
-
Field Detail
-
DEBUG
private static final boolean DEBUG
-
classNameRewriter
private ClassNameRewriter classNameRewriter
-
-
Method Detail
-
setClassNameRewriter
public void setClassNameRewriter(ClassNameRewriter classNameRewriter)
- Specified by:
setClassNameRewriterin interfaceWarningComparator
-
compareNullElements
private int compareNullElements(java.lang.Object lhs, java.lang.Object rhs)
-
compareClassesAllowingNull
private int compareClassesAllowingNull(ClassAnnotation lhs, ClassAnnotation rhs)
Compare class annotations.- Parameters:
lhs- left hand class annotationrhs- right hand class annotation- Returns:
- comparison of the class annotations
-
compareMethodsAllowingNull
private int compareMethodsAllowingNull(MethodAnnotation lhs, MethodAnnotation rhs)
-
compareFieldsAllowingNull
private int compareFieldsAllowingNull(FieldAnnotation lhs, FieldAnnotation rhs)
-
convertMethod
private MethodAnnotation convertMethod(MethodAnnotation methodAnnotation)
-
convertField
private FieldAnnotation convertField(FieldAnnotation fieldAnnotation)
-
compare
public int compare(BugInstance lhs, BugInstance rhs)
- Specified by:
comparein interfacejava.util.Comparator<BugInstance>- Specified by:
comparein interfaceWarningComparator
-
-