diff options
author | Evgeny Mandrikov <mandrikov@gmail.com> | 2011-12-19 12:30:30 +0400 |
---|---|---|
committer | Evgeny Mandrikov <mandrikov@gmail.com> | 2011-12-19 13:21:22 +0400 |
commit | 5f377882e3a3b906bc41fbcc27a95ab590c7a00e (patch) | |
tree | a8fb4565eee9480ff4d7925a632fc0fd3242b199 | |
parent | 5c15078e72ae7a99c85af69c64f2db34cc10023b (diff) | |
download | sonarqube-5f377882e3a3b906bc41fbcc27a95ab590c7a00e.tar.gz sonarqube-5f377882e3a3b906bc41fbcc27a95ab590c7a00e.zip |
Fix violations
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); } } |