Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/xlc
diff options
context:
space:
mode:
authorJonah Graham2018-11-20 16:20:42 +0000
committerJonah Graham2018-11-22 21:55:36 +0000
commitcaf2292768deccd885b5b6989b731742e2e5edf4 (patch)
tree711a6088f2e17c7e31ebb51af1eadc1af00768e5 /xlc
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 'xlc')
-rw-r--r--xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/core/lrparser/xlc/XlcKeywords.java4
-rw-r--r--xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/c/XlcCParser.java2
-rw-r--r--xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/cpp/XlcCPPParser.java2
-rw-r--r--xlc/org.eclipse.cdt.errorparsers.xlc.tests/src/org/eclipse/cdt/errorparsers/xlc/tests/XlcErrorParserTester.java2
-rw-r--r--xlc/org.eclipse.cdt.make.xlc.core/src/org/eclipse/cdt/make/xlc/core/scannerconfig/AbstractXLCBuildOutputParser.java8
-rw-r--r--xlc/org.eclipse.cdt.make.xlc.core/src/org/eclipse/cdt/make/xlc/core/scannerconfig/PerFileXLCScannerInfoCollector.java74
-rw-r--r--xlc/org.eclipse.cdt.make.xlc.core/src/org/eclipse/cdt/make/xlc/core/scannerconfig/XLCBuildOutputParserUtility.java8
-rw-r--r--xlc/org.eclipse.cdt.make.xlc.core/src/org/eclipse/cdt/make/xlc/core/scannerconfig/XLCPerFileBuildOutputParser.java4
-rw-r--r--xlc/org.eclipse.cdt.make.xlc.core/src/org/eclipse/cdt/make/xlc/core/scannerconfig/XLCPerProjectBuildOutputParser.java8
-rw-r--r--xlc/org.eclipse.cdt.make.xlc.core/src/org/eclipse/cdt/make/xlc/core/scannerconfig/XlCSpecsConsoleParser.java10
-rw-r--r--xlc/org.eclipse.cdt.managedbuilder.xlc.core/src/org/eclipse/cdt/managedbuilder/xlc/core/XlcBuiltinSpecsDetector.java2
11 files changed, 62 insertions, 62 deletions
diff --git a/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/core/lrparser/xlc/XlcKeywords.java b/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/core/lrparser/xlc/XlcKeywords.java
index b8227279d18..d8984870628 100644
--- a/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/core/lrparser/xlc/XlcKeywords.java
+++ b/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/core/lrparser/xlc/XlcKeywords.java
@@ -30,7 +30,7 @@ public class XlcKeywords extends CLanguageKeywords {
public static final XlcKeywords ALL_C_KEYWORDS = createC(true, true);
public static final XlcKeywords ALL_CPP_KEYWORDS = createCPP(true, true, true, true, true);
- private final CharArrayMap<Integer> map = new CharArrayMap<Integer>();
+ private final CharArrayMap<Integer> map = new CharArrayMap<>();
private final ParserLanguage language;
private String[] allKeywords = null;
@@ -107,7 +107,7 @@ public class XlcKeywords extends CLanguageKeywords {
ICLanguageKeywords base = new CLanguageKeywords(language, getConfig(language));
String[] baseKeywords = base.getKeywords();
- List<String> keywords = new ArrayList<String>();
+ List<String> keywords = new ArrayList<>();
keywords.addAll(Arrays.asList(baseKeywords));
for (char[] keyword : map.keys()) {
diff --git a/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/c/XlcCParser.java b/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/c/XlcCParser.java
index 72b62e87b0d..19e0999a649 100644
--- a/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/c/XlcCParser.java
+++ b/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/c/XlcCParser.java
@@ -228,7 +228,7 @@ public class XlcCParser extends PrsStream
}
private void initActions(Map<String, String> properties) {
- ScopedStack<Object> astStack = new ScopedStack<Object>();
+ ScopedStack<Object> astStack = new ScopedStack<>();
action = new XlcCBuildASTParserAction(this, astStack, XlcCNodeFactory.getDefault(),
GCCSecondaryParserFactory.getDefault());
diff --git a/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/cpp/XlcCPPParser.java b/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/cpp/XlcCPPParser.java
index 4d05f69e37d..89e38f2ba29 100644
--- a/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/cpp/XlcCPPParser.java
+++ b/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/cpp/XlcCPPParser.java
@@ -230,7 +230,7 @@ public class XlcCPPParser extends PrsStream
}
private void initActions(Map<String, String> properties) {
- ScopedStack<Object> astStack = new ScopedStack<Object>();
+ ScopedStack<Object> astStack = new ScopedStack<>();
action = new XlcCPPBuildASTParserAction(this, astStack, XlcCPPNodeFactory.getDefault(),
GPPSecondaryParserFactory.getDefault());
diff --git a/xlc/org.eclipse.cdt.errorparsers.xlc.tests/src/org/eclipse/cdt/errorparsers/xlc/tests/XlcErrorParserTester.java b/xlc/org.eclipse.cdt.errorparsers.xlc.tests/src/org/eclipse/cdt/errorparsers/xlc/tests/XlcErrorParserTester.java
index 217943ebd27..da531ab13ef 100644
--- a/xlc/org.eclipse.cdt.errorparsers.xlc.tests/src/org/eclipse/cdt/errorparsers/xlc/tests/XlcErrorParserTester.java
+++ b/xlc/org.eclipse.cdt.errorparsers.xlc.tests/src/org/eclipse/cdt/errorparsers/xlc/tests/XlcErrorParserTester.java
@@ -59,7 +59,7 @@ public class XlcErrorParserTester {
private String message;
}
- private List<MarkerData> markerDataList = new ArrayList<MarkerData>();
+ private List<MarkerData> markerDataList = new ArrayList<>();
/*
* Dummy class implementing IMarkerGenerator lets get through testing
diff --git a/xlc/org.eclipse.cdt.make.xlc.core/src/org/eclipse/cdt/make/xlc/core/scannerconfig/AbstractXLCBuildOutputParser.java b/xlc/org.eclipse.cdt.make.xlc.core/src/org/eclipse/cdt/make/xlc/core/scannerconfig/AbstractXLCBuildOutputParser.java
index e7ef4adde10..10edebfaf5a 100644
--- a/xlc/org.eclipse.cdt.make.xlc.core/src/org/eclipse/cdt/make/xlc/core/scannerconfig/AbstractXLCBuildOutputParser.java
+++ b/xlc/org.eclipse.cdt.make.xlc.core/src/org/eclipse/cdt/make/xlc/core/scannerconfig/AbstractXLCBuildOutputParser.java
@@ -226,8 +226,8 @@ public abstract class AbstractXLCBuildOutputParser implements IScannerInfoConsol
* @return array of commands
*/
protected String[][] tokenize(String line, boolean escapeInsideDoubleQuotes) {
- ArrayList<String[]> commands = new ArrayList<String[]>();
- ArrayList<String> tokens = new ArrayList<String>();
+ ArrayList<String[]> commands = new ArrayList<>();
+ ArrayList<String> tokens = new ArrayList<>();
StringBuffer token = new StringBuffer();
final char[] input = line.toCharArray();
@@ -388,7 +388,7 @@ public abstract class AbstractXLCBuildOutputParser implements IScannerInfoConsol
protected List<String> getFileExtensionsList() {
IContentTypeManager manager = Platform.getContentTypeManager();
- List<String> extensions = new LinkedList<String>();
+ List<String> extensions = new LinkedList<>();
IContentType cSource = manager.getContentType(CCorePlugin.CONTENT_TYPE_CSOURCE);
IContentType cppSource = manager.getContentType(CCorePlugin.CONTENT_TYPE_CXXSOURCE);
@@ -408,7 +408,7 @@ public abstract class AbstractXLCBuildOutputParser implements IScannerInfoConsol
protected String[] getFileExtensions() {
IContentTypeManager manager = Platform.getContentTypeManager();
- List<String> extensions = new LinkedList<String>();
+ List<String> extensions = new LinkedList<>();
IContentType cSource = manager.getContentType(CCorePlugin.CONTENT_TYPE_CSOURCE);
IContentType cppSource = manager.getContentType(CCorePlugin.CONTENT_TYPE_CXXSOURCE);
diff --git a/xlc/org.eclipse.cdt.make.xlc.core/src/org/eclipse/cdt/make/xlc/core/scannerconfig/PerFileXLCScannerInfoCollector.java b/xlc/org.eclipse.cdt.make.xlc.core/src/org/eclipse/cdt/make/xlc/core/scannerconfig/PerFileXLCScannerInfoCollector.java
index 5ef88b40059..6c399b62398 100644
--- a/xlc/org.eclipse.cdt.make.xlc.core/src/org/eclipse/cdt/make/xlc/core/scannerconfig/PerFileXLCScannerInfoCollector.java
+++ b/xlc/org.eclipse.cdt.make.xlc.core/src/org/eclipse/cdt/make/xlc/core/scannerconfig/PerFileXLCScannerInfoCollector.java
@@ -181,7 +181,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
private boolean updateMacroSettings(ICLanguageSetting langSetting) {
ICLanguageSettingEntry[] entries = langSetting.getSettingEntries(ICSettingEntry.MACRO);
- List<ICLanguageSettingEntry> newEntries = new LinkedList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> newEntries = new LinkedList<>();
for (ICLanguageSettingEntry entry : entries) {
newEntries.add(entry);
}
@@ -219,7 +219,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
private boolean updateIncludeSettings(ICLanguageSetting langSetting) {
ICLanguageSettingEntry[] entries = langSetting.getSettingEntries(ICSettingEntry.INCLUDE_PATH);
- List<ICLanguageSettingEntry> newEntries = new LinkedList<ICLanguageSettingEntry>();
+ List<ICLanguageSettingEntry> newEntries = new LinkedList<>();
for (ICLanguageSettingEntry entry : entries) {
newEntries.add(entry);
}
@@ -281,7 +281,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
synchronized (fLock) {
IPerFileDiscoveredPathInfo2 info1 = getPerFileInfo1();
if (info1 != null) {
- Map<IResource, PathInfo> map = new HashMap<IResource, PathInfo>();
+ Map<IResource, PathInfo> map = new HashMap<>();
map.putAll(info1.getPathInfoMap());
map.putAll(fInfo2.getPathInfoMap());
return map;
@@ -301,7 +301,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
synchronized (fLock) {
IPerFileDiscoveredPathInfo2 info1 = getPerFileInfo1();
if (info1 != null) {
- List<IPath> list = new LinkedList<IPath>();
+ List<IPath> list = new LinkedList<>();
for (IPath path1 : info1.getIncludeFiles(path)) {
list.add(path1);
}
@@ -322,7 +322,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
public IPath[] getIncludePaths(IPath path) {
synchronized (fLock) {
- Set<IPath> pathSet = new HashSet<IPath>();
+ Set<IPath> pathSet = new HashSet<>();
// add project level settings if other info is per project
if (fInfo1 instanceof DiscoveredPathInfo) {
@@ -353,7 +353,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
@Override
public IPath[] getMacroFiles(IPath path) {
synchronized (fLock) {
- Set<IPath> pathSet = new HashSet<IPath>();
+ Set<IPath> pathSet = new HashSet<>();
IPerFileDiscoveredPathInfo2 info1 = getPerFileInfo1();
if (info1 != null) {
@@ -376,7 +376,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
public IPath[] getQuoteIncludePaths(IPath path) {
synchronized (fLock) {
- Set<IPath> pathSet = new HashSet<IPath>();
+ Set<IPath> pathSet = new HashSet<>();
IPerFileDiscoveredPathInfo2 info1 = getPerFileInfo1();
if (info1 != null) {
@@ -399,7 +399,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
public Map<String, String> getSymbols(IPath path) {
synchronized (fLock) {
- Map<String, String> symbols = new HashMap<String, String>();
+ Map<String, String> symbols = new HashMap<>();
// add project level settings
Map<String, String> projectSymbols = fInfo1.getSymbols();
@@ -478,7 +478,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
public IPath[] getIncludeFiles(IPath path) {
synchronized (fLock) {
- Set<IPath> pathSet = new LinkedHashSet<IPath>();
+ Set<IPath> pathSet = new LinkedHashSet<>();
// get the command
CCommandDSC cmd = getCommand(path);
if (cmd != null) {
@@ -516,7 +516,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
if (includepaths == null || includepaths.length == 0) {
return quotepaths;
}
- ArrayList<IPath> result = new ArrayList<IPath>(includepaths.length + quotepaths.length);
+ ArrayList<IPath> result = new ArrayList<>(includepaths.length + quotepaths.length);
result.addAll(Arrays.asList(includepaths));
result.addAll(Arrays.asList(quotepaths));
return result.toArray(new IPath[result.size()]);
@@ -528,7 +528,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
@Override
public IPath[] getIncludePaths(IPath path) {
synchronized (fLock) {
- Set<IPath> pathSet = new LinkedHashSet<IPath>();
+ Set<IPath> pathSet = new LinkedHashSet<>();
// get the command
CCommandDSC cmd = getCommand(path);
if (cmd != null) {
@@ -554,7 +554,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
@Override
public IPath[] getMacroFiles(IPath path) {
synchronized (fLock) {
- Set<IPath> pathSet = new LinkedHashSet<IPath>();
+ Set<IPath> pathSet = new LinkedHashSet<>();
// get the command
CCommandDSC cmd = getCommand(path);
if (cmd != null) {
@@ -596,7 +596,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
@Override
public IPath[] getQuoteIncludePaths(IPath path) {
synchronized (fLock) {
- Set<IPath> pathSet = new LinkedHashSet<IPath>();
+ Set<IPath> pathSet = new LinkedHashSet<>();
// get the command
CCommandDSC cmd = getCommand(path);
if (cmd != null) {
@@ -646,7 +646,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
@Override
public Map<String, String> getSymbols(IPath path) {
synchronized (fLock) {
- Map<String, String> definedSymbols = new HashMap<String, String>();
+ Map<String, String> definedSymbols = new HashMap<>();
// put project data in first so file level data can override it
// use project scope scanner info
@@ -728,9 +728,9 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
public final Map<IFile, Integer> fileToCommandIdMap; // maps each file to the corresponding command id
public ScannerInfoData() {
- commandIdCommandMap = new LinkedHashMap<Integer, CCommandDSC>(); // [commandId, command]
- fileToCommandIdMap = new HashMap<IFile, Integer>(); // [file, commandId]
- commandIdToFilesMap = new HashMap<Integer, Set<IFile>>(); // [commandId, set of files]
+ commandIdCommandMap = new LinkedHashMap<>(); // [commandId, command]
+ fileToCommandIdMap = new HashMap<>(); // [file, commandId]
+ commandIdToFilesMap = new HashMap<>(); // [commandId, set of files]
}
/* (non-Javadoc)
@@ -747,10 +747,10 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
- Map<ScannerInfoTypes, List<String>> scannerInfo = new HashMap<ScannerInfoTypes, List<String>>();
+ Map<ScannerInfoTypes, List<String>> scannerInfo = new HashMap<>();
- List<String> includes = new LinkedList<String>();
- List<String> symbols = new LinkedList<String>();
+ List<String> includes = new LinkedList<>();
+ List<String> symbols = new LinkedList<>();
// iterate over children
for (Node projectChild = projectElement
@@ -852,7 +852,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
}
// serialize file level info
- List<Integer> commandIds = new ArrayList<Integer>(commandIdCommandMap.keySet());
+ List<Integer> commandIds = new ArrayList<>(commandIdCommandMap.keySet());
Collections.sort(commandIds);
for (Iterator<Integer> i = commandIds.iterator(); i.hasNext();) {
Integer commandId = i.next();
@@ -915,7 +915,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
IPath[] incFiles = stringListToPathArray(cmd.getIncludeFile());
IPath[] macroFiles = stringListToPathArray(cmd.getImacrosFile());
List symbols = cmd.getSymbols();
- Map<String, String> definedSymbols = new HashMap<String, String>(symbols.size());
+ Map<String, String> definedSymbols = new HashMap<>(symbols.size());
for (Iterator i = symbols.iterator(); i.hasNext();) {
String symbol = (String) i.next();
String key = ScannerConfigUtil.getSymbolKey(symbol);
@@ -932,7 +932,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
* @return
*/
protected static IPath[] stringListToPathArray(List<String> discovered) {
- List<Path> allIncludes = new ArrayList<Path>(discovered.size());
+ List<Path> allIncludes = new ArrayList<>(discovered.size());
for (Iterator<String> j = discovered.iterator(); j.hasNext();) {
String include = j.next();
if (!allIncludes.contains(include)) {
@@ -948,7 +948,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
/** monitor for data access */
protected final Object fLock = new Object();
- private Map<IProject, Map<?, ?>> fProjectSettingsMap = new HashMap<IProject, Map<?, ?>>();
+ private Map<IProject, Map<?, ?>> fProjectSettingsMap = new HashMap<>();
protected final SortedSet<Integer> freeCommandIdPool; // sorted set of free command ids
protected IProject project;
@@ -965,10 +965,10 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
sid = new ScannerInfoData();
// siChangedForFileList = new ArrayList();
- siChangedForFileMap = new HashMap<IResource, Integer>();
- siChangedForCommandIdList = new ArrayList<Integer>();
+ siChangedForFileMap = new HashMap<>();
+ siChangedForCommandIdList = new ArrayList<>();
- freeCommandIdPool = new TreeSet<Integer>();
+ freeCommandIdPool = new TreeSet<>();
}
/**
@@ -977,7 +977,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
*/
protected void addCompilerCommand(IFile file, CCommandDSC cmd) {
synchronized (fLock) {
- List<CCommandDSC> existingCommands = new ArrayList<CCommandDSC>(sid.commandIdCommandMap.values());
+ List<CCommandDSC> existingCommands = new ArrayList<>(sid.commandIdCommandMap.values());
int index = existingCommands.indexOf(cmd);
if (index != -1) {
cmd = existingCommands.get(index);
@@ -1045,7 +1045,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
// update sid.commandIdToFilesMap
Set<IFile> fileSet = sid.commandIdToFilesMap.get(commandId);
if (fileSet == null) {
- fileSet = new HashSet<IFile>();
+ fileSet = new HashSet<>();
sid.commandIdToFilesMap.put(commandId, fileSet);
CCommandDSC cmd = sid.commandIdCommandMap.get(commandId);
if (cmd != null) {
@@ -1083,7 +1083,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
protected Map<IResource, PathInfo> calculatePathInfoMap() {
synchronized (fLock) {
- Map<IResource, PathInfo> map = new HashMap<IResource, PathInfo>(sid.fileToCommandIdMap.size() + 1);
+ Map<IResource, PathInfo> map = new HashMap<>(sid.fileToCommandIdMap.size() + 1);
Map.Entry entry;
IFile file;
CCommandDSC cmd;
@@ -1317,7 +1317,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
includes = (List<String>) projectScannerInfo.get(ScannerInfoTypes.INCLUDE_PATHS);
}
- List<IPath> pathList = new LinkedList<IPath>();
+ List<IPath> pathList = new LinkedList<>();
if (includes != null) {
for (String include : includes) {
@@ -1346,7 +1346,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
*/
protected IPath[] getAllIncludePaths1(int type) {
synchronized (fLock) {
- List<String> allIncludes = new ArrayList<String>();
+ List<String> allIncludes = new ArrayList<>();
for (Iterator<Integer> i = sid.commandIdCommandMap.keySet().iterator(); i.hasNext();) {
Integer cmdId = i.next();
CCommandDSC cmd = sid.commandIdCommandMap.get(cmdId);
@@ -1397,7 +1397,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
Map projectScannerInfo = fProjectSettingsMap.get(project);
- Map<String, String> symbols = new HashMap<String, String>();
+ Map<String, String> symbols = new HashMap<>();
if (projectScannerInfo != null) {
List<String> projectSymbols = (List<String>) projectScannerInfo
@@ -1427,7 +1427,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
*/
protected Map<String, String> getAllSymbols1() {
synchronized (fLock) {
- Map<String, String> symbols = new HashMap<String, String>();
+ Map<String, String> symbols = new HashMap<>();
for (Iterator<Integer> i = sid.commandIdCommandMap.keySet().iterator(); i.hasNext();) {
Integer cmdId = i.next();
CCommandDSC cmd = sid.commandIdCommandMap.get(cmdId);
@@ -1451,7 +1451,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
@Override
public List<CCommandDSC> getCollectedScannerInfo(Object resource, ScannerInfoTypes type) {
- List<CCommandDSC> rv = new ArrayList<CCommandDSC>();
+ List<CCommandDSC> rv = new ArrayList<>();
// check the resource
String errorMessage = null;
if (resource == null) {
@@ -1554,7 +1554,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
@Override
public List<String> getIncludePaths() {
synchronized (fLock) {
- List<String> pathStrings = new LinkedList<String>();
+ List<String> pathStrings = new LinkedList<>();
List<IPath> paths = Arrays.asList(getAllIncludePaths(INCLUDE_PATH));
paths.addAll(Arrays.asList(getAllIncludePaths(QUOTE_INCLUDE_PATH)));
@@ -1637,7 +1637,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
}
monitor.beginTask(Messages.getString("ScannerInfoCollector.Processing"), 100); //$NON-NLS-1$
monitor.subTask(Messages.getString("ScannerInfoCollector.Processing")); //$NON-NLS-1$
- ArrayList<IResource> changedResources = new ArrayList<IResource>();
+ ArrayList<IResource> changedResources = new ArrayList<>();
synchronized (fLock) {
if (scannerInfoChanged()) {
applyFileDeltas();
diff --git a/xlc/org.eclipse.cdt.make.xlc.core/src/org/eclipse/cdt/make/xlc/core/scannerconfig/XLCBuildOutputParserUtility.java b/xlc/org.eclipse.cdt.make.xlc.core/src/org/eclipse/cdt/make/xlc/core/scannerconfig/XLCBuildOutputParserUtility.java
index 6e7e3048fe1..dec8c2aebd4 100644
--- a/xlc/org.eclipse.cdt.make.xlc.core/src/org/eclipse/cdt/make/xlc/core/scannerconfig/XLCBuildOutputParserUtility.java
+++ b/xlc/org.eclipse.cdt.make.xlc.core/src/org/eclipse/cdt/make/xlc/core/scannerconfig/XLCBuildOutputParserUtility.java
@@ -101,8 +101,8 @@ public class XLCBuildOutputParserUtility {
private List<String> fNameConflicts;
protected XLCBuildOutputParserUtility(IPath baseDirectory, IPath workingDirectory) {
- fDirectoryStack = new Vector<IPath>();
- fErrors = new ArrayList<Problem>();
+ fDirectoryStack = new Vector<>();
+ fErrors = new ArrayList<>();
this.fBaseDirectory = baseDirectory;
if (workingDirectory != null) {
pushDirectory(workingDirectory);
@@ -114,8 +114,8 @@ public class XLCBuildOutputParserUtility {
*
*/
public XLCBuildOutputParserUtility(IProject project, IPath workingDirectory, IMarkerGenerator markerGenerator) {
- fDirectoryStack = new Vector<IPath>();
- fErrors = new ArrayList<Problem>();
+ fDirectoryStack = new Vector<>();
+ fErrors = new ArrayList<>();
this.project = project;
fBaseDirectory = getPathForResource(project);
if (workingDirectory != null) {
diff --git a/xlc/org.eclipse.cdt.make.xlc.core/src/org/eclipse/cdt/make/xlc/core/scannerconfig/XLCPerFileBuildOutputParser.java b/xlc/org.eclipse.cdt.make.xlc.core/src/org/eclipse/cdt/make/xlc/core/scannerconfig/XLCPerFileBuildOutputParser.java
index 9f55f00aeb8..c0f7b78c395 100644
--- a/xlc/org.eclipse.cdt.make.xlc.core/src/org/eclipse/cdt/make/xlc/core/scannerconfig/XLCPerFileBuildOutputParser.java
+++ b/xlc/org.eclipse.cdt.make.xlc.core/src/org/eclipse/cdt/make/xlc/core/scannerconfig/XLCPerFileBuildOutputParser.java
@@ -132,9 +132,9 @@ public class XLCPerFileBuildOutputParser extends AbstractXLCBuildOutputParser {
if (true /*file != null*/) {
CCommandDSC cmd = getUtility().getNewCCommandDSC(tokens, compilerInvocationIndex,
extensionsIndex > 0);
- List<CCommandDSC> cmdList = new CopyOnWriteArrayList<CCommandDSC>();
+ List<CCommandDSC> cmdList = new CopyOnWriteArrayList<>();
cmdList.add(cmd);
- Map<ScannerInfoTypes, List<CCommandDSC>> sc = new HashMap<ScannerInfoTypes, List<CCommandDSC>>(1);
+ Map<ScannerInfoTypes, List<CCommandDSC>> sc = new HashMap<>(1);
sc.put(ScannerInfoTypes.COMPILER_COMMAND, cmdList);
getCollector().contributeToScannerConfig(file, sc);
if (fCollector != null && fCollector instanceof IScannerInfoCollector2) {
diff --git a/xlc/org.eclipse.cdt.make.xlc.core/src/org/eclipse/cdt/make/xlc/core/scannerconfig/XLCPerProjectBuildOutputParser.java b/xlc/org.eclipse.cdt.make.xlc.core/src/org/eclipse/cdt/make/xlc/core/scannerconfig/XLCPerProjectBuildOutputParser.java
index 04a188f0ef2..c2a19dce496 100644
--- a/xlc/org.eclipse.cdt.make.xlc.core/src/org/eclipse/cdt/make/xlc/core/scannerconfig/XLCPerProjectBuildOutputParser.java
+++ b/xlc/org.eclipse.cdt.make.xlc.core/src/org/eclipse/cdt/make/xlc/core/scannerconfig/XLCPerProjectBuildOutputParser.java
@@ -49,9 +49,9 @@ public class XLCPerProjectBuildOutputParser extends AbstractXLCBuildOutputParser
}
// Recognized gcc or g++ compiler invocation
- List<String> includes = new CopyOnWriteArrayList<String>();
- List<String> symbols = new CopyOnWriteArrayList<String>();
- List<String> targetSpecificOptions = new CopyOnWriteArrayList<String>();
+ List<String> includes = new CopyOnWriteArrayList<>();
+ List<String> symbols = new CopyOnWriteArrayList<>();
+ List<String> targetSpecificOptions = new CopyOnWriteArrayList<>();
String fileName = null;
for (int j = compilerInvocationIdx + 1; j < tokens.length; j++) {
@@ -148,7 +148,7 @@ public class XLCPerProjectBuildOutputParser extends AbstractXLCBuildOutputParser
}
// Contribute discovered includes and symbols to the ScannerInfoCollector
if (translatedIncludes.size() > 0 || symbols.size() > 0) {
- Map<ScannerInfoTypes, List<String>> scannerInfo = new HashMap<ScannerInfoTypes, List<String>>();
+ Map<ScannerInfoTypes, List<String>> scannerInfo = new HashMap<>();
scannerInfo.put(ScannerInfoTypes.INCLUDE_PATHS, translatedIncludes);
scannerInfo.put(ScannerInfoTypes.SYMBOL_DEFINITIONS, symbols);
scannerInfo.put(ScannerInfoTypes.TARGET_SPECIFIC_OPTION, targetSpecificOptions);
diff --git a/xlc/org.eclipse.cdt.make.xlc.core/src/org/eclipse/cdt/make/xlc/core/scannerconfig/XlCSpecsConsoleParser.java b/xlc/org.eclipse.cdt.make.xlc.core/src/org/eclipse/cdt/make/xlc/core/scannerconfig/XlCSpecsConsoleParser.java
index 35f7fc71547..54a9af68d69 100644
--- a/xlc/org.eclipse.cdt.make.xlc.core/src/org/eclipse/cdt/make/xlc/core/scannerconfig/XlCSpecsConsoleParser.java
+++ b/xlc/org.eclipse.cdt.make.xlc.core/src/org/eclipse/cdt/make/xlc/core/scannerconfig/XlCSpecsConsoleParser.java
@@ -64,11 +64,11 @@ public class XlCSpecsConsoleParser implements IScannerInfoConsoleParser {
protected IScannerInfoCollector fCollector = null;
- protected List<String> symbols = new ArrayList<String>();
+ protected List<String> symbols = new ArrayList<>();
- protected List<String> includes = new ArrayList<String>();
- protected List<String> c_includes = new ArrayList<String>();
- protected List<String> cpp_includes = new ArrayList<String>();
+ protected List<String> includes = new ArrayList<>();
+ protected List<String> c_includes = new ArrayList<>();
+ protected List<String> cpp_includes = new ArrayList<>();
boolean c_lang; // if language is C only search for the C include paths from the XL Compiler, otherwise get the C++ ones.
@@ -173,7 +173,7 @@ public class XlCSpecsConsoleParser implements IScannerInfoConsoleParser {
*/
@Override
public void shutdown() {
- Map<ScannerInfoTypes, List<String>> scannerInfo = new HashMap<ScannerInfoTypes, List<String>>();
+ Map<ScannerInfoTypes, List<String>> scannerInfo = new HashMap<>();
// insert compiler constants, work around buggy xlC option for dumping symbols (it misses a few)
for (String constant : compilerConstants) {
diff --git a/xlc/org.eclipse.cdt.managedbuilder.xlc.core/src/org/eclipse/cdt/managedbuilder/xlc/core/XlcBuiltinSpecsDetector.java b/xlc/org.eclipse.cdt.managedbuilder.xlc.core/src/org/eclipse/cdt/managedbuilder/xlc/core/XlcBuiltinSpecsDetector.java
index cadfcf72135..edc06ec460a 100644
--- a/xlc/org.eclipse.cdt.managedbuilder.xlc.core/src/org/eclipse/cdt/managedbuilder/xlc/core/XlcBuiltinSpecsDetector.java
+++ b/xlc/org.eclipse.cdt.managedbuilder.xlc.core/src/org/eclipse/cdt/managedbuilder/xlc/core/XlcBuiltinSpecsDetector.java
@@ -72,7 +72,7 @@ public class XlcBuiltinSpecsDetector extends ToolchainBuiltinSpecsDetector
@Override
protected List<String> parseOptions(String line) {
- List<String> options = new ArrayList<String>();
+ List<String> options = new ArrayList<>();
Matcher optionMatcher = OPTIONS_PATTERN.matcher(line);
while (optionMatcher.find()) {
String option = optionMatcher.group(OPTION_GROUP);

Back to the top