This class defines a
compareTo(...)method but inherits itsequals()method fromjava.lang.Object. Generally, the value of compareTo should return zero if and only if equals returns true. If this is violated, weird and unpredictable failures will occur in classes such as PriorityQueue. In Java 5 the PriorityQueue.remove method uses the compareTo method, while in Java 6 it uses the equals method.From the JavaDoc for the compareTo method in the Comparable interface:
It is strongly recommended, but not strictly required that(x.compareTo(y)==0) == (x.equals(y)). Generally speaking, any class that implements the Comparable interface and violates this condition should clearly indicate this fact. The recommended language is "Note: this class has a natural ordering that is inconsistent with equals."
| 2 | org.jcoderz.phoenix.report.FindingsSummary |
| org.jcoderz.phoenix.report.FindingsSummary$FindingSummary defines compareTo(FindingsSummary$FindingSummary) and uses Object.equals() [372], org.jcoderz.phoenix.report.FindingsSummary$FindingSummary$FindingOccurrence defines compareTo(FindingsSummary$FindingSummary$FindingOccurrence) and uses Object.equals() [608] | |
| 1 | org.jcoderz.guidelines.snippets.SampleSnippets |
| org.jcoderz.guidelines.snippets.SampleSnippets$IndentionSample defines compareTo(Object) and uses Object.equals() [364] | |
| 1 | org.jcoderz.commons.logging.FixLengthFormat |
| org.jcoderz.commons.logging.FixLengthFormat$Padding defines compareTo(Object) and uses Object.equals() [110] | |
| 1 | org.jcoderz.commons.logging.LogLineFormat |
| org.jcoderz.commons.logging.LogLineFormat$LogLineType defines compareTo(Object) and uses Object.equals() [156] | |
| 1 | org.jcoderz.phoenix.report.FileSummary |
| org.jcoderz.phoenix.report.FileSummary defines compareTo(FileSummary) and uses Object.equals() [556] | |