diff options
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 4966607d700..4b24446d133 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 842babbe64e..94aa4f522df 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); |