diff options
6 files changed, 8 insertions, 7 deletions
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/IssueTrackingResult.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/IssueTrackingResult.java index a0aab1ba2e3..2c5dcac619c 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/IssueTrackingResult.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/issue/IssueTrackingResult.java @@ -28,13 +28,13 @@ import org.sonar.api.rule.RuleKey; import org.sonar.core.issue.db.IssueDto; import java.util.Collection; -import java.util.IdentityHashMap; +import java.util.Map; import java.util.Set; class IssueTrackingResult { private final Set<IssueDto> unmatched = Sets.newHashSet(); private final Multimap<RuleKey, IssueDto> unmatchedByRule = LinkedHashMultimap.create(); - private final IdentityHashMap<DefaultIssue, IssueDto> matched = Maps.newIdentityHashMap(); + private final Map<DefaultIssue, IssueDto> matched = Maps.newIdentityHashMap(); Collection<IssueDto> unmatched() { return unmatched; 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); diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefinitions.java b/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefinitions.java index be86d2c363e..4085756d0d3 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefinitions.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefinitions.java @@ -166,7 +166,7 @@ public final class PropertyDefinitions implements BatchComponent, ServerComponen Map<Category, Map<SubCategory, Collection<PropertyDefinition>>> byCategory = new HashMap<Category, Map<SubCategory, Collection<PropertyDefinition>>>(); if (qualifier == null) { // Special categories on global page - HashMap<SubCategory, Collection<PropertyDefinition>> emailSubCategories = new HashMap<SubCategory, Collection<PropertyDefinition>>(); + Map<SubCategory, Collection<PropertyDefinition>> emailSubCategories = new HashMap<SubCategory, Collection<PropertyDefinition>>(); emailSubCategories.put(new SubCategory("email", true), new ArrayList<PropertyDefinition>()); byCategory.put(new Category(CoreProperties.CATEGORY_GENERAL, false), emailSubCategories); diff --git a/sonar-server/src/main/java/org/sonar/server/db/migrations/violation/Referentials.java b/sonar-server/src/main/java/org/sonar/server/db/migrations/violation/Referentials.java index df64c46aacd..b771700cd7b 100644 --- a/sonar-server/src/main/java/org/sonar/server/db/migrations/violation/Referentials.java +++ b/sonar-server/src/main/java/org/sonar/server/db/migrations/violation/Referentials.java @@ -107,7 +107,7 @@ class Referentials { stmt = connection.createStatement(); stmt.setFetchSize(10000); rs = stmt.executeQuery("select id from rule_failures"); - ConcurrentLinkedQueue<long[]> queue = new ConcurrentLinkedQueue<long[]>(); + Queue<long[]> queue = new ConcurrentLinkedQueue<long[]>(); totalViolations = 0; long[] block = new long[VIOLATION_GROUP_SIZE]; diff --git a/sonar-squid/src/main/java/org/sonar/squid/recognizer/CodeRecognizer.java b/sonar-squid/src/main/java/org/sonar/squid/recognizer/CodeRecognizer.java index 253a2e35706..11740966cd1 100644 --- a/sonar-squid/src/main/java/org/sonar/squid/recognizer/CodeRecognizer.java +++ b/sonar-squid/src/main/java/org/sonar/squid/recognizer/CodeRecognizer.java @@ -42,7 +42,7 @@ public class CodeRecognizer { } public final List<String> extractCodeLines(List<String> lines) { - ArrayList<String> codeLines = new ArrayList<String>(); + List<String> codeLines = new ArrayList<String>(); for (String line : lines) { if (recognition(line) >= threshold) { codeLines.add(line); |