diff options
author | Hans Joachim Desserud <github@desserud.org> | 2013-11-02 19:26:35 +0100 |
---|---|---|
committer | Hans Joachim Desserud <github@desserud.org> | 2013-11-02 19:26:35 +0100 |
commit | 500eff0b5f242d9481329a9bde126a7e1c29ed6f (patch) | |
tree | 2556da8863a6faf698bf712d86cde8d6fd476126 /sonar-duplications/src | |
parent | 2eb5e77ee6ff9f74f70a294e19c3ad23411367d1 (diff) | |
download | sonarqube-500eff0b5f242d9481329a9bde126a7e1c29ed6f.tar.gz sonarqube-500eff0b5f242d9481329a9bde126a7e1c29ed6f.zip |
Fixes a couple of issues by using interfaces rather than a specific implementation
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); |