Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonah Graham2018-11-20 11:20:42 -0500
committerJonah Graham2018-11-22 16:55:36 -0500
commitcaf2292768deccd885b5b6989b731742e2e5edf4 (patch)
tree711a6088f2e17c7e31ebb51af1eadc1af00768e5 /codan/org.eclipse.cdt.codan.core
parent8844a8f9f22802fedffa3cb2a8a21b041aa64b74 (diff)
downloadorg.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 'codan/org.eclipse.cdt.codan.core')
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/CodanCorePlugin.java2
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractChecker.java2
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/FileScopeProblemPreference.java2
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/ListProblemPreference.java4
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/MapProblemPreference.java4
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CheckerInvocationContext.java2
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CheckersRegistry.java12
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CheckersTimeStats.java2
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodanApplication.java2
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/ConnectorNode.java2
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/ControlFlowGraph.java12
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/DecisionNode.java2
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanProblemCategory.java6
-rw-r--r--codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/ProblemProfile.java2
14 files changed, 28 insertions, 28 deletions
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/CodanCorePlugin.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/CodanCorePlugin.java
index c5342d8489..c2f6ab4942 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/CodanCorePlugin.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/CodanCorePlugin.java
@@ -195,7 +195,7 @@ public class CodanCorePlugin extends Plugin {
if (bundle != null) {
BundleContext context = bundle.getBundleContext();
if (context != null) {
- ServiceTracker<DebugOptions, DebugOptions> tracker = new ServiceTracker<DebugOptions, DebugOptions>(
+ ServiceTracker<DebugOptions, DebugOptions> tracker = new ServiceTracker<>(
context, DebugOptions.class.getName(), null);
try {
tracker.open();
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractChecker.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractChecker.java
index adfff49ab3..eb3de93f39 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractChecker.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/model/AbstractChecker.java
@@ -80,7 +80,7 @@ public abstract class AbstractChecker implements IChecker {
* @since 2.0
*/
public List<IProblem> getProblemsByMainId(String id, IResource file) {
- ArrayList<IProblem> list = new ArrayList<IProblem>();
+ ArrayList<IProblem> list = new ArrayList<>();
IProblemProfile resourceProfile = CheckersRegistry.getInstance().getResourceProfile(file);
IProblem[] problems = resourceProfile.getProblems();
for (int i = 0; i < problems.length; i++) {
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/FileScopeProblemPreference.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/FileScopeProblemPreference.java
index f30cb20fe8..066a66d8eb 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/FileScopeProblemPreference.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/FileScopeProblemPreference.java
@@ -176,7 +176,7 @@ public class FileScopeProblemPreference extends AbstractProblemPreference {
checkKeyword(tokenizer, keyword);
checkChar(tokenizer, '=');
checkChar(tokenizer, '>');
- ArrayList<IPath> list = new ArrayList<IPath>();
+ ArrayList<IPath> list = new ArrayList<>();
int token;
try {
checkChar(tokenizer, '(');
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/ListProblemPreference.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/ListProblemPreference.java
index 6ed92ddd65..dccef8edea 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/ListProblemPreference.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/ListProblemPreference.java
@@ -31,7 +31,7 @@ public class ListProblemPreference extends AbstractProblemPreference
* of all elements.
*/
public static final String COMMON_DESCRIPTOR_KEY = "#"; //$NON-NLS-1$
- protected ArrayList<Object> list = new ArrayList<Object>();
+ protected ArrayList<Object> list = new ArrayList<>();
protected IProblemPreference childDescriptor;
/**
@@ -196,7 +196,7 @@ public class ListProblemPreference extends AbstractProblemPreference
@Override
public Object clone() {
ListProblemPreference list1 = (ListProblemPreference) super.clone();
- list1.list = new ArrayList<Object>();
+ list1.list = new ArrayList<>();
list1.setChildDescriptor((IProblemPreference) getChildDescriptor().clone());
for (Iterator<Object> iterator = list.iterator(); iterator.hasNext();) {
Object value = iterator.next();
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/MapProblemPreference.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/MapProblemPreference.java
index 0ef0cbc615..85737b0055 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/MapProblemPreference.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/core/param/MapProblemPreference.java
@@ -131,7 +131,7 @@ public class MapProblemPreference extends AbstractProblemPreference
public Object clone() {
MapProblemPreference map = (MapProblemPreference) super.clone();
synchronized (hash) {
- map.hash = Collections.synchronizedMap(new LinkedHashMap<String, IProblemPreference>(hash));
+ map.hash = Collections.synchronizedMap(new LinkedHashMap<>(hash));
}
// now we have to clone the values too
for (Entry<String, IProblemPreference> entry : map.hash.entrySet()) {
@@ -255,7 +255,7 @@ public class MapProblemPreference extends AbstractProblemPreference
@Override
public Object getValue() {
synchronized (hash) {
- LinkedHashMap<String, Object> map = new LinkedHashMap<String, Object>();
+ LinkedHashMap<String, Object> map = new LinkedHashMap<>();
for (Iterator<IProblemPreference> iterator = hash.values().iterator(); iterator.hasNext();) {
IProblemPreference pref = iterator.next();
map.put(pref.getKey(), pref.getValue());
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CheckerInvocationContext.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CheckerInvocationContext.java
index deeed71413..f32ccd030e 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CheckerInvocationContext.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CheckerInvocationContext.java
@@ -34,7 +34,7 @@ public class CheckerInvocationContext implements ICheckerInvocationContext {
*/
public CheckerInvocationContext(IResource resource) {
this.resource = resource;
- objectStorage = new HashMap<Class<?>, Object>();
+ objectStorage = new HashMap<>();
}
@Override
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CheckersRegistry.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CheckersRegistry.java
index 7d50dd60b8..c31a1f080d 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CheckersRegistry.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CheckersRegistry.java
@@ -64,13 +64,13 @@ public class CheckersRegistry implements Iterable<IChecker>, ICheckersRegistry {
private static final String CATEGORY_ELEMENT = "category"; //$NON-NLS-1$
private static final Object DEFAULT = "DEFAULT"; //$NON-NLS-1$
public static final String CLONE_SUFFIX = ".COPY"; //$NON-NLS-1$
- private Collection<IChecker> checkers = new ArrayList<IChecker>();
+ private Collection<IChecker> checkers = new ArrayList<>();
private static CheckersRegistry instance;
private static boolean initialized = false;
- private final Map<Object, IProblemProfile> profiles = new HashMap<Object, IProblemProfile>();
- private final Map<IChecker, Collection<IProblem>> problemList = new HashMap<IChecker, Collection<IProblem>>();
- private final Map<String, IChecker> problemCheckerMapping = new HashMap<String, IChecker>();
- private final List<ICheckerEnablementVerifier> checkerEnablementVerifiers = new ArrayList<ICheckerEnablementVerifier>();
+ private final Map<Object, IProblemProfile> profiles = new HashMap<>();
+ private final Map<IChecker, Collection<IProblem>> problemList = new HashMap<>();
+ private final Map<String, IChecker> problemCheckerMapping = new HashMap<>();
+ private final List<ICheckerEnablementVerifier> checkerEnablementVerifiers = new ArrayList<>();
private CheckersRegistry() {
instance = this;
@@ -301,7 +301,7 @@ public class CheckersRegistry implements Iterable<IChecker>, ICheckersRegistry {
public void addRefProblem(IChecker c, IProblem p) {
Collection<IProblem> plist = problemList.get(c);
if (plist == null) {
- plist = new ArrayList<IProblem>();
+ plist = new ArrayList<>();
problemList.put(c, plist);
}
plist.add(p);
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CheckersTimeStats.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CheckersTimeStats.java
index 94ecf856c6..f65a8177af 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CheckersTimeStats.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CheckersTimeStats.java
@@ -60,7 +60,7 @@ public class CheckersTimeStats {
}
}
- private Map<String, TimeRecord> records = new HashMap<String, TimeRecord>();
+ private Map<String, TimeRecord> records = new HashMap<>();
/**
* @param id - checker id
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodanApplication.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodanApplication.java
index 12672a22ef..238af82ec2 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodanApplication.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/CodanApplication.java
@@ -35,7 +35,7 @@ import org.eclipse.osgi.util.NLS;
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class CodanApplication implements IApplication {
- private Collection<String> projects = new ArrayList<String>();
+ private Collection<String> projects = new ArrayList<>();
private boolean verbose;
private boolean all;
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/ConnectorNode.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/ConnectorNode.java
index bb9317989a..d53c042e52 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/ConnectorNode.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/ConnectorNode.java
@@ -23,7 +23,7 @@ import org.eclipse.cdt.codan.core.model.cfg.IJumpNode;
* TODO: add description
*/
public class ConnectorNode extends AbstractSingleOutgoingNode implements IConnectorNode {
- protected ArrayList<IBasicBlock> incoming = new ArrayList<IBasicBlock>(2);
+ protected ArrayList<IBasicBlock> incoming = new ArrayList<>(2);
protected ConnectorNode() {
super();
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/ControlFlowGraph.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/ControlFlowGraph.java
index bae7880dab..ecffbd3ab9 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/ControlFlowGraph.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/ControlFlowGraph.java
@@ -34,7 +34,7 @@ import org.eclipse.cdt.codan.core.model.cfg.IStartNode;
*/
public class ControlFlowGraph implements IControlFlowGraph {
private List<IExitNode> exitNodes;
- private List<IBasicBlock> deadNodes = new ArrayList<IBasicBlock>();
+ private List<IBasicBlock> deadNodes = new ArrayList<>();
private IStartNode start;
public ControlFlowGraph(IStartNode start, Collection<IExitNode> exitNodes) {
@@ -55,11 +55,11 @@ public class ControlFlowGraph implements IControlFlowGraph {
public void setExitNodes(Collection<IExitNode> exitNodes) {
if (this.exitNodes != null)
throw new IllegalArgumentException("Cannot modify already exiting connector"); //$NON-NLS-1$
- this.exitNodes = Collections.unmodifiableList(new ArrayList<IExitNode>(exitNodes));
+ this.exitNodes = Collections.unmodifiableList(new ArrayList<>(exitNodes));
}
public void setUnconnectedNodes(Collection<IBasicBlock> nodes) {
- this.deadNodes = Collections.unmodifiableList(new ArrayList<IBasicBlock>(nodes));
+ this.deadNodes = Collections.unmodifiableList(new ArrayList<>(nodes));
}
/*
@@ -126,7 +126,7 @@ public class ControlFlowGraph implements IControlFlowGraph {
*/
@Override
public Collection<IBasicBlock> getNodes() {
- Collection<IBasicBlock> result = new LinkedHashSet<IBasicBlock>();
+ Collection<IBasicBlock> result = new LinkedHashSet<>();
getNodes(getStartNode(), result);
getDeadNodes(result);
return result;
@@ -150,13 +150,13 @@ public class ControlFlowGraph implements IControlFlowGraph {
}
public Collection<IBasicBlock> getDeadNodes() {
- Collection<IBasicBlock> result = new LinkedHashSet<IBasicBlock>();
+ Collection<IBasicBlock> result = new LinkedHashSet<>();
getDeadNodes(result);
return result;
}
private void getDeadNodes(Collection<IBasicBlock> result) {
- Collection<IBasicBlock> liveNodes = new LinkedHashSet<IBasicBlock>();
+ Collection<IBasicBlock> liveNodes = new LinkedHashSet<>();
getNodes(getStartNode(), liveNodes);
for (Iterator<IBasicBlock> iterator = deadNodes.iterator(); iterator.hasNext();) {
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/DecisionNode.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/DecisionNode.java
index a55a59ba23..ec7a960411 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/DecisionNode.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/cfg/DecisionNode.java
@@ -25,7 +25,7 @@ import org.eclipse.cdt.codan.core.model.cfg.IDecisionNode;
* @see IDecisionNode
*/
public class DecisionNode extends AbstractSingleIncomingNode implements IDecisionNode {
- private List<IBasicBlock> next = new ArrayList<IBasicBlock>(2);
+ private List<IBasicBlock> next = new ArrayList<>(2);
private IConnectorNode conn;
protected DecisionNode() {
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanProblemCategory.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanProblemCategory.java
index 8951f69574..d6bab54fb2 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanProblemCategory.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/CodanProblemCategory.java
@@ -28,7 +28,7 @@ import org.eclipse.cdt.codan.core.model.IProblemProfile;
public class CodanProblemCategory extends CodanProblemElement implements IProblemCategory, Cloneable {
private String id;
private String name;
- private ArrayList<IProblemElement> list = new ArrayList<IProblemElement>();
+ private ArrayList<IProblemElement> list = new ArrayList<>();
public CodanProblemCategory(String id, String name) {
this.id = id;
@@ -89,7 +89,7 @@ public class CodanProblemCategory extends CodanProblemElement implements IProble
* @return list of categories
*/
public static IProblemCategory[] findProblemCategories(IProblemCategory c, String id) {
- ArrayList<IProblemCategory> list = new ArrayList<IProblemCategory>();
+ ArrayList<IProblemCategory> list = new ArrayList<>();
Object[] children = c.getChildren();
for (Object object : children) {
if (object instanceof IProblemCategory) {
@@ -131,7 +131,7 @@ public class CodanProblemCategory extends CodanProblemElement implements IProble
@Override
public Object clone() {
CodanProblemCategory catClone = (CodanProblemCategory) super.clone();
- catClone.list = new ArrayList<IProblemElement>();
+ catClone.list = new ArrayList<>();
for (Iterator<IProblemElement> iterator = this.list.iterator(); iterator.hasNext();) {
IProblemElement child = iterator.next();
IProblemElement childClone = (IProblemElement) child.clone();
diff --git a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/ProblemProfile.java b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/ProblemProfile.java
index f602900b23..e75a16dccd 100644
--- a/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/ProblemProfile.java
+++ b/codan/org.eclipse.cdt.codan.core/src/org/eclipse/cdt/codan/internal/core/model/ProblemProfile.java
@@ -42,7 +42,7 @@ public class ProblemProfile implements IProblemProfile, Cloneable {
@Override
public IProblem[] getProblems() {
- Collection<IProblem> problems = new ArrayList<IProblem>();
+ Collection<IProblem> problems = new ArrayList<>();
collectProblems(getRoot(), problems);
return problems.toArray(new IProblem[problems.size()]);
}

Back to the top