aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-graph
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2011-11-07 22:58:12 +0100
committersimonbrandhof <simon.brandhof@gmail.com>2011-11-07 22:58:12 +0100
commit2d37e6afa362160ffcdecc31c36855ba4ab060d0 (patch)
tree39732513425582781dda85a695a88c368a74daa8 /sonar-graph
parent78bb7e03936055a93419f9284aab475955d46960 (diff)
downloadsonarqube-2d37e6afa362160ffcdecc31c36855ba4ab060d0.tar.gz
sonarqube-2d37e6afa362160ffcdecc31c36855ba4ab060d0.zip
fix violations
Diffstat (limited to 'sonar-graph')
-rw-r--r--sonar-graph/src/main/java/org/sonar/graph/FeedbackCycle.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/sonar-graph/src/main/java/org/sonar/graph/FeedbackCycle.java b/sonar-graph/src/main/java/org/sonar/graph/FeedbackCycle.java
index a23cb74c9f0..5c202597db6 100644
--- a/sonar-graph/src/main/java/org/sonar/graph/FeedbackCycle.java
+++ b/sonar-graph/src/main/java/org/sonar/graph/FeedbackCycle.java
@@ -29,6 +29,9 @@ import java.util.Set;
import com.google.common.collect.HashMultiset;
import com.google.common.collect.Multiset;
+/**
+ * Note: this class has a natural ordering that is inconsistent with equals
+ */
public final class FeedbackCycle implements Iterable<FeedbackEdge>, Comparable<FeedbackCycle> {
private List<FeedbackEdge> orderedFeedbackEdges;
@@ -89,7 +92,7 @@ public final class FeedbackCycle implements Iterable<FeedbackEdge>, Comparable<F
}
public int compareTo(FeedbackCycle feedbackCycle) {
- if (getTotalOccurrencesOfEdgesInCycle() < feedbackCycle.getTotalOccurrencesOfEdgesInCycle()) {
+ if (getTotalOccurrencesOfEdgesInCycle() < feedbackCycle.getTotalOccurrencesOfEdgesInCycle()) {//NOSONAR this class has a natural ordering that is inconsistent with equals
return -1;
}
if (getTotalOccurrencesOfEdgesInCycle() == feedbackCycle.getTotalOccurrencesOfEdgesInCycle()) {