diff options
author | Jonah Graham | 2018-11-20 16:20:42 +0000 |
---|---|---|
committer | Jonah Graham | 2018-11-22 21:55:36 +0000 |
commit | caf2292768deccd885b5b6989b731742e2e5edf4 (patch) | |
tree | 711a6088f2e17c7e31ebb51af1eadc1af00768e5 /core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler | |
parent | 8844a8f9f22802fedffa3cb2a8a21b041aa64b74 (diff) | |
download | org.eclipse.cdt-caf2292768deccd885b5b6989b731742e2e5edf4.tar.gz org.eclipse.cdt-caf2292768deccd885b5b6989b731742e2e5edf4.tar.xz org.eclipse.cdt-caf2292768deccd885b5b6989b731742e2e5edf4.zip |
Bug 540373: Cleanup: Remove redundant type arguments
This was done by selecting all projects in Eclipse then
Source -> Clean Up... -> choosing:
- Remove redundant type arguments
and completing the wizard
Change-Id: Iaecc7010f097b4b1fabd29ccaa34ccb23a716fbf
Diffstat (limited to 'core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler')
2 files changed, 12 insertions, 12 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/NodeCommentMap.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/NodeCommentMap.java index f8f0d14d342..8753023c21a 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/NodeCommentMap.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/NodeCommentMap.java @@ -34,10 +34,10 @@ import org.eclipse.cdt.internal.core.dom.rewrite.util.ASTNodes; * @author Guido Zgraggen IFS */ public class NodeCommentMap { - protected final Map<IASTNode, List<IASTComment>> leadingMap = new HashMap<IASTNode, List<IASTComment>>(); - protected final Map<IASTNode, List<IASTComment>> trailingMap = new HashMap<IASTNode, List<IASTComment>>(); - protected final Map<IASTNode, List<IASTComment>> freestandingMap = new HashMap<IASTNode, List<IASTComment>>(); - protected final List<IASTTranslationUnit> coveredUnits = new ArrayList<IASTTranslationUnit>(); + protected final Map<IASTNode, List<IASTComment>> leadingMap = new HashMap<>(); + protected final Map<IASTNode, List<IASTComment>> trailingMap = new HashMap<>(); + protected final Map<IASTNode, List<IASTComment>> freestandingMap = new HashMap<>(); + protected final List<IASTTranslationUnit> coveredUnits = new ArrayList<>(); /** * Add a comment to the map with the trailing comments. @@ -47,7 +47,7 @@ public class NodeCommentMap { public void addTrailingCommentToNode(IASTNode node, IASTComment comment) { List<IASTComment> comments = trailingMap.get(node); if (comments == null) { - comments = new ArrayList<IASTComment>(); + comments = new ArrayList<>(); } comments.add(comment); trailingMap.put(node, comments); @@ -62,7 +62,7 @@ public class NodeCommentMap { */ public List<IASTComment> getTrailingCommentsForNode(IASTNode node) { List<IASTComment> list = trailingMap.get(node); - return list != null ? list : new ArrayList<IASTComment>(); + return list != null ? list : new ArrayList<>(); } /** @@ -73,7 +73,7 @@ public class NodeCommentMap { public void addLeadingCommentToNode(IASTNode node, IASTComment comment) { List<IASTComment> comments = leadingMap.get(node); if (comments == null) { - comments = new ArrayList<IASTComment>(); + comments = new ArrayList<>(); } comments.add(comment); leadingMap.put(node, comments); @@ -88,7 +88,7 @@ public class NodeCommentMap { */ public List<IASTComment> getLeadingCommentsForNode(IASTNode node) { List<IASTComment> list = leadingMap.get(node); - return list != null ? list : new ArrayList<IASTComment>(); + return list != null ? list : new ArrayList<>(); } /** @@ -99,7 +99,7 @@ public class NodeCommentMap { public void addFreestandingCommentToNode(IASTNode node, IASTComment comment) { List<IASTComment> comments = freestandingMap.get(node); if (comments == null) { - comments = new ArrayList<IASTComment>(); + comments = new ArrayList<>(); } comments.add(comment); freestandingMap.put(node, comments); @@ -114,7 +114,7 @@ public class NodeCommentMap { */ public List<IASTComment> getFreestandingCommentsForNode(IASTNode node) { List<IASTComment> list = freestandingMap.get(node); - return list != null ? list : new ArrayList<IASTComment>(); + return list != null ? list : new ArrayList<>(); } /** @@ -149,7 +149,7 @@ public class NodeCommentMap { * @return List */ public List<IASTComment> getAllCommentsForNode(IASTNode node) { - List<IASTComment> comment = new ArrayList<IASTComment>(); + List<IASTComment> comment = new ArrayList<>(); comment.addAll(getFreestandingCommentsForNode(node)); comment.addAll(getLeadingCommentsForNode(node)); comment.addAll(getTrailingCommentsForNode(node)); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/NodeCommenter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/NodeCommenter.java index 378f98c5cc5..65f9aac1c05 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/NodeCommenter.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/NodeCommenter.java @@ -73,7 +73,7 @@ public class NodeCommenter { this.visitor = visitor; this.commentHandler = commHandler; this.commentMap = commentMap; - this.children = new ArrayList<IASTNode>(); + this.children = new ArrayList<>(); } protected void writeNodeList(IASTNode[] nodes) { |