aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Mandrikov <mandrikov@gmail.com>2011-12-19 12:30:30 +0400
committerEvgeny Mandrikov <mandrikov@gmail.com>2011-12-19 13:21:22 +0400
commit5f377882e3a3b906bc41fbcc27a95ab590c7a00e (patch)
treea8fb4565eee9480ff4d7925a632fc0fd3242b199
parent5c15078e72ae7a99c85af69c64f2db34cc10023b (diff)
downloadsonarqube-5f377882e3a3b906bc41fbcc27a95ab590c7a00e.tar.gz
sonarqube-5f377882e3a3b906bc41fbcc27a95ab590c7a00e.zip
Fix violations
-rw-r--r--sonar-duplications/src/main/java/org/sonar/duplications/detector/suffixtree/Search.java2
-rw-r--r--sonar-duplications/src/main/java/org/sonar/duplications/detector/suffixtree/SuffixTree.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/sonar-duplications/src/main/java/org/sonar/duplications/detector/suffixtree/Search.java b/sonar-duplications/src/main/java/org/sonar/duplications/detector/suffixtree/Search.java
index 8e5b4e665d1..9125d05bce3 100644
--- a/sonar-duplications/src/main/java/org/sonar/duplications/detector/suffixtree/Search.java
+++ b/sonar-duplications/src/main/java/org/sonar/duplications/detector/suffixtree/Search.java
@@ -72,7 +72,7 @@ public final class Search {
list.add(node.depth);
node.endSize = list.size();
} else {
- if (node != tree.getRootNode()) { // inner node = not leaf and not root
+ if (!node.equals(tree.getRootNode())) { // inner node = not leaf and not root
innerNodes.add(node);
}
for (Edge edge : node.getEdges()) {
diff --git a/sonar-duplications/src/main/java/org/sonar/duplications/detector/suffixtree/SuffixTree.java b/sonar-duplications/src/main/java/org/sonar/duplications/detector/suffixtree/SuffixTree.java
index e79137dc10a..2c4d196f376 100644
--- a/sonar-duplications/src/main/java/org/sonar/duplications/detector/suffixtree/SuffixTree.java
+++ b/sonar-duplications/src/main/java/org/sonar/duplications/detector/suffixtree/SuffixTree.java
@@ -108,7 +108,7 @@ public final class SuffixTree {
}
private void updateSuffixNode(Node node, Node suffixNode) {
- if ((node != null) && (node != root)) {
+ if ((node != null) && (!node.equals(root))) {
node.setSuffixNode(suffixNode);
}
}