diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2014-03-19 00:00:28 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2014-03-19 00:00:28 +0100 |
commit | 194d1b9d31993c14ab35965582500bc2dade7947 (patch) | |
tree | 54d6fb89400a046048c6112a9e59a379b291f0a8 /sonar-duplications/src | |
parent | f5bd11bbc574fe1dbb80e7dfe2f66bcaeb60ddbc (diff) | |
parent | 500eff0b5f242d9481329a9bde126a7e1c29ed6f (diff) | |
download | sonarqube-194d1b9d31993c14ab35965582500bc2dade7947.tar.gz sonarqube-194d1b9d31993c14ab35965582500bc2dade7947.zip |
Fix some quality flaws
Diffstat (limited to 'sonar-duplications/src')
-rw-r--r-- | sonar-duplications/src/main/java/org/sonar/duplications/detector/suffixtree/Search.java | 2 | ||||
-rw-r--r-- | sonar-duplications/src/main/java/org/sonar/duplications/token/TokenQueue.java | 3 |
2 files changed, 3 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 06202b71a45..7d8a3a9877b 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 @@ -63,7 +63,7 @@ public final class Search { * Depth-first search (DFS). */ private void dfs() { - LinkedList<Node> stack = Lists.newLinkedList(); + Deque<Node> stack = Lists.newLinkedList(); stack.add(tree.getRootNode()); while (!stack.isEmpty()) { Node node = stack.removeLast(); diff --git a/sonar-duplications/src/main/java/org/sonar/duplications/token/TokenQueue.java b/sonar-duplications/src/main/java/org/sonar/duplications/token/TokenQueue.java index 90cfa404c34..e1ad2e8da24 100644 --- a/sonar-duplications/src/main/java/org/sonar/duplications/token/TokenQueue.java +++ b/sonar-duplications/src/main/java/org/sonar/duplications/token/TokenQueue.java @@ -19,6 +19,7 @@ */ package org.sonar.duplications.token; +import java.util.Deque; import java.util.Iterator; import java.util.LinkedList; import java.util.List; @@ -26,7 +27,7 @@ import java.util.ListIterator; public class TokenQueue implements Iterable<Token> { - private final LinkedList<Token> tokenQueue; + private final Deque<Token> tokenQueue; public TokenQueue(List<Token> tokenList) { tokenQueue = new LinkedList<Token>(tokenList); |