diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2016-05-24 12:48:25 +0200 |
---|---|---|
committer | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2016-05-24 16:36:20 +0200 |
commit | 9e291cdec361a9d49adf6da953913f0ce676f9b7 (patch) | |
tree | 10dc34235b354c27ec0b3d046159cb2b16f06959 /sonar-duplications/src | |
parent | a3837a58d3d2f329b994dcafdb1adfed660fb25d (diff) | |
download | sonarqube-9e291cdec361a9d49adf6da953913f0ce676f9b7.tar.gz sonarqube-9e291cdec361a9d49adf6da953913f0ce676f9b7.zip |
remove use of Guava's Objects.equal
Diffstat (limited to 'sonar-duplications/src')
2 files changed, 4 insertions, 5 deletions
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 fc0975dd87d..9d97443a8bc 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 @@ -19,7 +19,7 @@ */ package org.sonar.duplications.detector.suffixtree; -import com.google.common.base.Objects; +import java.util.Objects; /** * Provides algorithm to construct suffix tree. @@ -80,7 +80,7 @@ public final class SuffixTree { // implicit node, a little more complicated edge = active.getOriginNode().findEdge(symbolAt(active.getBeginIndex())); int span = active.getSpan(); - if (Objects.equal(symbolAt(edge.getBeginIndex() + span + 1), symbolAt(endIndex))) { + if (Objects.equals(symbolAt(edge.getBeginIndex() + span + 1), symbolAt(endIndex))) { break; } parentNode = edge.splitEdge(active); diff --git a/sonar-duplications/src/test/java/org/sonar/duplications/detector/suffixtree/StringSuffixTree.java b/sonar-duplications/src/test/java/org/sonar/duplications/detector/suffixtree/StringSuffixTree.java index b18954a87d2..38f01553b3d 100644 --- a/sonar-duplications/src/test/java/org/sonar/duplications/detector/suffixtree/StringSuffixTree.java +++ b/sonar-duplications/src/test/java/org/sonar/duplications/detector/suffixtree/StringSuffixTree.java @@ -19,9 +19,8 @@ */ package org.sonar.duplications.detector.suffixtree; -import com.google.common.base.Objects; - import java.util.LinkedList; +import java.util.Objects; import java.util.Queue; public class StringSuffixTree { @@ -113,7 +112,7 @@ public class StringSuffixTree { if (i == str.length()) { break; } - if (!Objects.equal(tree.symbolAt(j), str.symbolAt(i))) { + if (!Objects.equals(tree.symbolAt(j), str.symbolAt(i))) { return -1; } i++; |