aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-graph
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2012-05-25 15:51:44 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2012-05-25 15:51:44 +0200
commita00b76dd1b57d56fd06797b79b6b62bd1b5fcf9d (patch)
tree3adb51e49beeacdb2d4d52b99444ac5094d8ac1f /sonar-graph
parentff4d30779e2b145efd7cc7ae8dee259721a7e20e (diff)
downloadsonarqube-a00b76dd1b57d56fd06797b79b6b62bd1b5fcf9d.tar.gz
sonarqube-a00b76dd1b57d56fd06797b79b6b62bd1b5fcf9d.zip
Fix some quality flaws
Diffstat (limited to 'sonar-graph')
-rw-r--r--sonar-graph/src/main/java/org/sonar/graph/FeedbackEdge.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/sonar-graph/src/main/java/org/sonar/graph/FeedbackEdge.java b/sonar-graph/src/main/java/org/sonar/graph/FeedbackEdge.java
index a8eccb9ad71..1d3a0f636ad 100644
--- a/sonar-graph/src/main/java/org/sonar/graph/FeedbackEdge.java
+++ b/sonar-graph/src/main/java/org/sonar/graph/FeedbackEdge.java
@@ -19,6 +19,8 @@
*/
package org.sonar.graph;
+import org.apache.commons.lang.math.NumberUtils;
+
public class FeedbackEdge implements Comparable<FeedbackEdge> {
private Edge edge;
@@ -53,7 +55,7 @@ public class FeedbackEdge implements Comparable<FeedbackEdge> {
if (this.getRelativeWeight() < feedbackEdge.getRelativeWeight()) {
return -1;
}
- if (this.getRelativeWeight() == feedbackEdge.getRelativeWeight()) {
+ if (NumberUtils.compare(this.getRelativeWeight(), feedbackEdge.getRelativeWeight())==0) {
return this.getEdge().getFrom().toString().compareTo(feedbackEdge.getEdge().getFrom().toString());
}
return 1;