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 /build/org.eclipse.cdt.make.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 'build/org.eclipse.cdt.make.core')
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeBuilder.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeCorePlugin.java8
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeScannerInfo.java6
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeScannerProvider.java6
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/scannerconfig/DiscoveredScannerInfo.java20
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/scannerconfig/DiscoveredScannerInfoProvider.java2
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/scannerconfig/PathInfo.java6
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/BuildInfoFactory.java2
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeProject.java2
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeTargetManager.java8
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/ProjectTargets.java6
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/AbstractMakefile.java24
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Parent.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Rule.java2
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefile.java6
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefileChecker.java2
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/posix/PosixMakefileUtil.java2
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/CDataDiscoveredInfoCalculator.java40
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredPathContainer.java2
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredPathInfo.java16
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredPathManager.java6
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredScannerInfoStore.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/PerFileDiscoveredPathContainer.java2
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/ScannerConfigUtil.java10
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParser.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParserUtility.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileBOPConsoleParser.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileBOPConsoleParserUtility.java14
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileSIPConsoleParser.java8
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCScannerInfoConsoleParser.java12
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCSpecsConsoleParser.java6
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/ScannerInfoConsoleParserUtility.java8
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/CCommandDSC.java22
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/CygpathTranslator.java2
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/SymbolEntry.java6
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/DefaultRunSIProvider.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/PerFileSICollector.java38
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/PerProjectSICollector.java18
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/SCMarkerGenerator.java2
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/ScannerConfigInfoFactory2.java30
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/ScannerConfigProfile.java4
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/ScannerConfigProfileManager.java10
42 files changed, 193 insertions, 193 deletions
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeBuilder.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeBuilder.java
index d991fe8007..c39621de9e 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeBuilder.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeBuilder.java
@@ -199,7 +199,7 @@ public class MakeBuilder extends ACBuilder {
String[] errorParsers = info.getErrorParsers();
ErrorParserManager epm = new ErrorParserManager(getProject(), workingDirectoryURI, this, errorParsers);
- List<IConsoleParser> parsers = new ArrayList<IConsoleParser>();
+ List<IConsoleParser> parsers = new ArrayList<>();
if (!isOnlyClean) {
ICProjectDescription prjDescription = CoreModel.getDefault().getProjectDescription(project);
if (prjDescription != null) {
@@ -249,7 +249,7 @@ public class MakeBuilder extends ACBuilder {
private HashMap<String, String> getEnvironment(ICommandLauncher launcher, IMakeBuilderInfo info)
throws CoreException {
- HashMap<String, String> envMap = new HashMap<String, String>();
+ HashMap<String, String> envMap = new HashMap<>();
if (info.appendEnvironment()) {
@SuppressWarnings({ "unchecked", "rawtypes" })
Map<String, String> env = (Map) launcher.getEnvironment();
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeCorePlugin.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeCorePlugin.java
index 80d4ede4d3..26ffe7a00a 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeCorePlugin.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeCorePlugin.java
@@ -183,7 +183,7 @@ public class MakeCorePlugin extends Plugin {
public String[] getMakefileDirs() {
String stringList = getPluginPreferences().getString(MAKEFILE_DIRS);
StringTokenizer st = new StringTokenizer(stringList, File.pathSeparator + "\n\r");//$NON-NLS-1$
- ArrayList<String> v = new ArrayList<String>();
+ ArrayList<String> v = new ArrayList<>();
while (st.hasMoreElements()) {
v.add(st.nextToken());
}
@@ -198,7 +198,7 @@ public class MakeCorePlugin extends Plugin {
IMakefile makefile;
if (isGnuStyle) {
GNUMakefile gnu = new GNUMakefile();
- ArrayList<String> includeList = new ArrayList<String>();
+ ArrayList<String> includeList = new ArrayList<>();
includeList.add(new Path(file.getAbsolutePath()).removeLastSegments(1).toOSString());
includeList.addAll(Arrays.asList(gnu.getIncludeDirectories()));
includeList.addAll(Arrays.asList(makefileDirs));
@@ -246,7 +246,7 @@ public class MakeCorePlugin extends Plugin {
IMakefile makefile;
if (isGnuStyle) {
GNUMakefile gnu = new GNUMakefile();
- ArrayList<String> includeList = new ArrayList<String>();
+ ArrayList<String> includeList = new ArrayList<>();
includeList.add(new Path(fileURI.getPath()).removeLastSegments(1).toString());
includeList.addAll(Arrays.asList(gnu.getIncludeDirectories()));
includeList.addAll(Arrays.asList(makefileDirs));
@@ -372,7 +372,7 @@ public class MakeCorePlugin extends Plugin {
SI_CONSOLE_PARSER_SIMPLE_ID);
if (extension != null) {
IExtension[] extensions = extension.getExtensions();
- List<String> parserIds = new ArrayList<String>(extensions.length);
+ List<String> parserIds = new ArrayList<>(extensions.length);
for (int i = 0; i < extensions.length; i++) {
String parserId = extensions[i].getUniqueIdentifier();
if (parserId != null) {
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeScannerInfo.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeScannerInfo.java
index e863373c99..aed84fdf98 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeScannerInfo.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeScannerInfo.java
@@ -89,7 +89,7 @@ public class MakeScannerInfo implements IScannerInfo {
@Override
public synchronized Map<String, String> getDefinedSymbols() {
// Return the defined symbols for the default configuration
- HashMap<String, String> symbols = new HashMap<String, String>();
+ HashMap<String, String> symbols = new HashMap<>();
String[] symbolList = getPreprocessorSymbols();
for (int i = 0; i < symbolList.length; ++i) {
String symbol = symbolList[i];
@@ -112,7 +112,7 @@ public class MakeScannerInfo implements IScannerInfo {
protected List<String> getPathList() {
if (pathList == null) {
- pathList = new ArrayList<String>();
+ pathList = new ArrayList<>();
}
return pathList;
}
@@ -123,7 +123,7 @@ public class MakeScannerInfo implements IScannerInfo {
protected List<String> getSymbolList() {
if (symbolList == null) {
- symbolList = new ArrayList<String>();
+ symbolList = new ArrayList<>();
}
return symbolList;
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeScannerProvider.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeScannerProvider.java
index b398e6f089..b606691605 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeScannerProvider.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/MakeScannerProvider.java
@@ -123,8 +123,8 @@ public class MakeScannerProvider extends ScannerProvider {
ICDescriptor descriptor = CCorePlugin.getDefault().getCProjectDescription(project);
ICStorageElement storage = descriptor.getProjectStorageElement(CDESCRIPTOR_ID);
- ArrayList<String> includes = new ArrayList<String>();
- ArrayList<String> symbols = new ArrayList<String>();
+ ArrayList<String> includes = new ArrayList<>();
+ ArrayList<String> symbols = new ArrayList<>();
for (ICStorageElement child : storage.getChildren()) {
if (child.getName().equals(INCLUDE_PATH)) {
// Add the path to the property list
@@ -145,7 +145,7 @@ public class MakeScannerProvider extends ScannerProvider {
String[] includes = info.getIncludePaths();
ICProject cProject = CoreModel.getDefault().create(info.getProject());
IPathEntry[] entries = cProject.getRawPathEntries();
- List<IPathEntry> cPaths = new ArrayList<IPathEntry>(Arrays.asList(entries));
+ List<IPathEntry> cPaths = new ArrayList<>(Arrays.asList(entries));
Iterator<IPathEntry> cpIter = cPaths.iterator();
while (cpIter.hasNext()) {
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/scannerconfig/DiscoveredScannerInfo.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/scannerconfig/DiscoveredScannerInfo.java
index e28c031c2b..1528b4d77b 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/scannerconfig/DiscoveredScannerInfo.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/scannerconfig/DiscoveredScannerInfo.java
@@ -87,13 +87,13 @@ public class DiscoveredScannerInfo implements IScannerInfo {
public LinkedHashMap<String, Boolean> getDiscoveredIncludePaths() {
if (discoveredPaths == null) {
- return new LinkedHashMap<String, Boolean>();
+ return new LinkedHashMap<>();
}
- return new LinkedHashMap<String, Boolean>(discoveredPaths);
+ return new LinkedHashMap<>(discoveredPaths);
}
public synchronized void setDiscoveredIncludePaths(LinkedHashMap<String, Boolean> paths) {
- discoveredPaths = new LinkedHashMap<String, Boolean>(paths);
+ discoveredPaths = new LinkedHashMap<>(paths);
createPathLists();
}
@@ -119,13 +119,13 @@ public class DiscoveredScannerInfo implements IScannerInfo {
public LinkedHashMap<String, SymbolEntry> getDiscoveredSymbolDefinitions() {
if (discoveredSymbols == null) {
- return new LinkedHashMap<String, SymbolEntry>();
+ return new LinkedHashMap<>();
}
- return new LinkedHashMap<String, SymbolEntry>(discoveredSymbols);
+ return new LinkedHashMap<>(discoveredSymbols);
}
public synchronized void setDiscoveredSymbolDefinitions(LinkedHashMap<String, SymbolEntry> symbols) {
- discoveredSymbols = new LinkedHashMap<String, SymbolEntry>(symbols);
+ discoveredSymbols = new LinkedHashMap<>(symbols);
createSymbolsLists();
}
@@ -184,28 +184,28 @@ public class DiscoveredScannerInfo implements IScannerInfo {
private List<String> getActivePathList() {
if (activePaths == null) {
- activePaths = new ArrayList<String>();
+ activePaths = new ArrayList<>();
}
return activePaths;
}
private List<String> getRemovedPathList() {
if (removedPaths == null) {
- removedPaths = new ArrayList<String>();
+ removedPaths = new ArrayList<>();
}
return removedPaths;
}
private List<String> getActiveSymbolsList() {
if (activeSymbols == null) {
- activeSymbols = new ArrayList<String>();
+ activeSymbols = new ArrayList<>();
}
return activeSymbols;
}
private List<String> getRemovedSymbolsList() {
if (removedSymbols == null) {
- removedSymbols = new ArrayList<String>();
+ removedSymbols = new ArrayList<>();
}
return removedSymbols;
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/scannerconfig/DiscoveredScannerInfoProvider.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/scannerconfig/DiscoveredScannerInfoProvider.java
index 6b0a8d642a..d97f7a58e8 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/scannerconfig/DiscoveredScannerInfoProvider.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/scannerconfig/DiscoveredScannerInfoProvider.java
@@ -117,7 +117,7 @@ public class DiscoveredScannerInfoProvider extends ScannerProvider {
ICProject cProject = CoreModel.getDefault().create(project);
if (cProject != null) {
IPathEntry[] entries = cProject.getRawPathEntries();
- List<IPathEntry> newEntries = new ArrayList<IPathEntry>(Arrays.asList(entries));
+ List<IPathEntry> newEntries = new ArrayList<>(Arrays.asList(entries));
if (!newEntries.contains(container)) {
newEntries.add(container);
cProject.setRawPathEntries(newEntries.toArray(new IPathEntry[newEntries.size()]), null);
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/scannerconfig/PathInfo.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/scannerconfig/PathInfo.java
index 920947af76..762dc37182 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/scannerconfig/PathInfo.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/core/scannerconfig/PathInfo.java
@@ -46,7 +46,7 @@ public final class PathInfo {
? (IPath[]) quoteIncludePaths.clone()
: EMPTY_PATH_ARRAY;
fSymbols = symbols != null && symbols.size() != 0 ? getInternedHashMap(symbols)
- : new HashMap<String, String>(0);
+ : new HashMap<>(0);
fIncludeFiles = includeFiles != null && includeFiles.length != 0 ? (IPath[]) includeFiles.clone()
: EMPTY_PATH_ARRAY;
fMacroFiles = macroFiles != null && macroFiles.length != 0 ? (IPath[]) macroFiles.clone() : EMPTY_PATH_ARRAY;
@@ -63,9 +63,9 @@ public final class PathInfo {
return null;
if (oldMap.isEmpty())
- return new HashMap<String, String>(oldMap);
+ return new HashMap<>(oldMap);
- HashMap<String, String> newMap = new HashMap<String, String>(oldMap.size());
+ HashMap<String, String> newMap = new HashMap<>(oldMap.size());
for (String key : oldMap.keySet()) {
newMap.put(SafeStringInterner.safeIntern(key), SafeStringInterner.safeIntern(oldMap.get(key)));
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/BuildInfoFactory.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/BuildInfoFactory.java
index 50507fe40a..162cdeb122 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/BuildInfoFactory.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/BuildInfoFactory.java
@@ -114,7 +114,7 @@ public class BuildInfoFactory {
@Override
public Map<String, String> getExpandedEnvironment() {
Map<String, String> env = getEnvironment();
- HashMap<String, String> envMap = new HashMap<String, String>(env.entrySet().size());
+ HashMap<String, String> envMap = new HashMap<>(env.entrySet().size());
boolean win32 = Platform.getOS().equals(Constants.OS_WIN32);
for (Map.Entry<String, String> entry : env.entrySet()) {
String key = entry.getKey();
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeProject.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeProject.java
index aff4b2830a..8c44527379 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeProject.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeProject.java
@@ -73,7 +73,7 @@ public class MakeProject implements ICOwner {
private String[] parseStringToArray(String syms) {
if (syms != null && syms.length() > 0) {
StringTokenizer tok = new StringTokenizer(syms, ";"); //$NON-NLS-1$
- ArrayList<String> list = new ArrayList<String>(tok.countTokens());
+ ArrayList<String> list = new ArrayList<>(tok.countTokens());
while (tok.hasMoreElements()) {
list.add(tok.nextToken());
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeTargetManager.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeTargetManager.java
index ef8a33ccb6..bff6029ada 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeTargetManager.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeTargetManager.java
@@ -51,9 +51,9 @@ public class MakeTargetManager implements IMakeTargetManager, IResourceChangeLis
private static String TARGETS_EXT = "targets"; //$NON-NLS-1$
private final ListenerList listeners = new ListenerList();
- private final Map<IProject, ProjectTargets> projectMap = new HashMap<IProject, ProjectTargets>();
+ private final Map<IProject, ProjectTargets> projectMap = new HashMap<>();
private HashMap<String, String> builderMap;
- protected Vector<IProject> fProjects = new Vector<IProject>();
+ protected Vector<IProject> fProjects = new Vector<>();
public MakeTargetManager() {
}
@@ -181,7 +181,7 @@ public class MakeTargetManager implements IMakeTargetManager, IResourceChangeLis
public String[] getTargetBuilders(IProject project) {
if (fProjects.contains(project) || hasTargetBuilder(project)) {
try {
- Vector<String> ids = new Vector<String>();
+ Vector<String> ids = new Vector<>();
IProjectDescription description = project.getDescription();
ICommand commands[] = description.getBuildSpec();
for (ICommand command : commands) {
@@ -334,7 +334,7 @@ public class MakeTargetManager implements IMakeTargetManager, IResourceChangeLis
}
protected void initializeBuilders() {
- builderMap = new HashMap<String, String>();
+ builderMap = new HashMap<>();
IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(MakeCorePlugin.PLUGIN_ID,
MakeTargetManager.TARGET_BUILD_EXT);
IExtension[] extensions = point.getExtensions();
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/ProjectTargets.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/ProjectTargets.java
index 47258024a0..1a53a4004b 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/ProjectTargets.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/ProjectTargets.java
@@ -59,7 +59,7 @@ public class ProjectTargets {
private static final String BAD_TARGET = "buidlTarget"; //$NON-NLS-1$
private static final String TARGET = "buildTarget"; //$NON-NLS-1$
- private HashMap<IContainer, List<IMakeTarget>> targetMap = new HashMap<IContainer, List<IMakeTarget>>();
+ private HashMap<IContainer, List<IMakeTarget>> targetMap = new HashMap<>();
private IProject project;
@@ -111,7 +111,7 @@ public class ProjectTargets {
}
public void set(IContainer container, IMakeTarget[] targets) throws CoreException {
- List<IMakeTarget> newList = new ArrayList<IMakeTarget>();
+ List<IMakeTarget> newList = new ArrayList<>();
for (IMakeTarget target : targets) {
target.setContainer(container);
if (newList.contains(target)) {
@@ -142,7 +142,7 @@ public class ProjectTargets {
MakeMessages.getString("MakeTargetManager.target_exists"), null)); //$NON-NLS-1$
}
if (list == null) {
- list = new ArrayList<IMakeTarget>();
+ list = new ArrayList<>();
targetMap.put(target.getContainer(), list);
}
list.add(target);
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/AbstractMakefile.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/AbstractMakefile.java
index d61d5947e5..4dfc52dece 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/AbstractMakefile.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/AbstractMakefile.java
@@ -61,7 +61,7 @@ public abstract class AbstractMakefile extends Parent implements IMakefile {
@Override
public IRule[] getRules() {
IDirective[] stmts = getDirectives(true);
- List<IDirective> array = new ArrayList<IDirective>(stmts.length);
+ List<IDirective> array = new ArrayList<>(stmts.length);
for (IDirective stmt : stmts) {
if (stmt instanceof IRule) {
array.add(stmt);
@@ -73,7 +73,7 @@ public abstract class AbstractMakefile extends Parent implements IMakefile {
@Override
public IRule[] getRules(String target) {
IRule[] rules = getRules();
- List<IRule> array = new ArrayList<IRule>(rules.length);
+ List<IRule> array = new ArrayList<>(rules.length);
for (IRule rule : rules) {
if (rule.getTarget().equals(target)) {
array.add(rule);
@@ -85,7 +85,7 @@ public abstract class AbstractMakefile extends Parent implements IMakefile {
@Override
public IInferenceRule[] getInferenceRules() {
IRule[] rules = getRules();
- List<IRule> array = new ArrayList<IRule>(rules.length);
+ List<IRule> array = new ArrayList<>(rules.length);
for (IRule rule : rules) {
if (rule instanceof IInferenceRule) {
array.add(rule);
@@ -97,7 +97,7 @@ public abstract class AbstractMakefile extends Parent implements IMakefile {
@Override
public IInferenceRule[] getInferenceRules(String target) {
IInferenceRule[] irules = getInferenceRules();
- List<IInferenceRule> array = new ArrayList<IInferenceRule>(irules.length);
+ List<IInferenceRule> array = new ArrayList<>(irules.length);
for (IInferenceRule irule : irules) {
if (irule.getTarget().equals(target)) {
array.add(irule);
@@ -109,7 +109,7 @@ public abstract class AbstractMakefile extends Parent implements IMakefile {
@Override
public ITargetRule[] getTargetRules() {
IRule[] trules = getRules();
- List<IRule> array = new ArrayList<IRule>(trules.length);
+ List<IRule> array = new ArrayList<>(trules.length);
for (IRule trule : trules) {
if (trule instanceof ITargetRule) {
array.add(trule);
@@ -121,7 +121,7 @@ public abstract class AbstractMakefile extends Parent implements IMakefile {
@Override
public ITargetRule[] getTargetRules(String target) {
ITargetRule[] trules = getTargetRules();
- List<ITargetRule> array = new ArrayList<ITargetRule>(trules.length);
+ List<ITargetRule> array = new ArrayList<>(trules.length);
for (ITargetRule trule : trules) {
if (trule.getTarget().equals(target)) {
array.add(trule);
@@ -133,7 +133,7 @@ public abstract class AbstractMakefile extends Parent implements IMakefile {
@Override
public IMacroDefinition[] getMacroDefinitions() {
IDirective[] stmts = getDirectives(true);
- List<IDirective> array = new ArrayList<IDirective>(stmts.length);
+ List<IDirective> array = new ArrayList<>(stmts.length);
for (IDirective stmt : stmts) {
if (stmt instanceof IMacroDefinition) {
array.add(stmt);
@@ -145,7 +145,7 @@ public abstract class AbstractMakefile extends Parent implements IMakefile {
@Override
public IMacroDefinition[] getMacroDefinitions(String name) {
IMacroDefinition[] variables = getMacroDefinitions();
- List<IMacroDefinition> array = new ArrayList<IMacroDefinition>(variables.length);
+ List<IMacroDefinition> array = new ArrayList<>(variables.length);
for (IMacroDefinition variable : variables) {
if (variable.getName().equals(name)) {
array.add(variable);
@@ -157,7 +157,7 @@ public abstract class AbstractMakefile extends Parent implements IMakefile {
@Override
public IMacroDefinition[] getBuiltinMacroDefinitions() {
IDirective[] stmts = getBuiltins();
- List<IDirective> array = new ArrayList<IDirective>(stmts.length);
+ List<IDirective> array = new ArrayList<>(stmts.length);
for (IDirective stmt : stmts) {
if (stmt instanceof IMacroDefinition) {
array.add(stmt);
@@ -169,7 +169,7 @@ public abstract class AbstractMakefile extends Parent implements IMakefile {
@Override
public IMacroDefinition[] getBuiltinMacroDefinitions(String name) {
IMacroDefinition[] variables = getBuiltinMacroDefinitions();
- List<IMacroDefinition> array = new ArrayList<IMacroDefinition>(variables.length);
+ List<IMacroDefinition> array = new ArrayList<>(variables.length);
for (IMacroDefinition variable : variables) {
if (variable.getName().equals(name)) {
array.add(variable);
@@ -180,7 +180,7 @@ public abstract class AbstractMakefile extends Parent implements IMakefile {
public IInferenceRule[] getBuiltinInferenceRules() {
IDirective[] stmts = getBuiltins();
- List<IDirective> array = new ArrayList<IDirective>(stmts.length);
+ List<IDirective> array = new ArrayList<>(stmts.length);
for (IDirective stmt : stmts) {
if (stmt instanceof IInferenceRule) {
array.add(stmt);
@@ -191,7 +191,7 @@ public abstract class AbstractMakefile extends Parent implements IMakefile {
public IInferenceRule[] getBuiltinInferenceRules(String target) {
IInferenceRule[] irules = getBuiltinInferenceRules();
- List<IInferenceRule> array = new ArrayList<IInferenceRule>(irules.length);
+ List<IInferenceRule> array = new ArrayList<>(irules.length);
for (IInferenceRule irule : irules) {
if (irule.getTarget().equals(target)) {
array.add(irule);
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Parent.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Parent.java
index daec5744e0..83e9b5f69f 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Parent.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Parent.java
@@ -26,7 +26,7 @@ import org.eclipse.cdt.make.core.makefile.IParent;
public abstract class Parent extends Directive implements IParent {
- ArrayList<Directive> children = new ArrayList<Directive>();
+ ArrayList<Directive> children = new ArrayList<>();
public Parent(Directive parent) {
super(parent);
@@ -34,7 +34,7 @@ public abstract class Parent extends Directive implements IParent {
public IDirective[] getDirectives(boolean expand) {
if (expand) {
- List<IDirective> directives = new ArrayList<IDirective>();
+ List<IDirective> directives = new ArrayList<>();
getDirectives(); // populates children for class Include
for (IDirective directive : children) {
directives.add(directive);
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Rule.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Rule.java
index 92fd011472..74955e027f 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Rule.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/Rule.java
@@ -37,7 +37,7 @@ public abstract class Rule extends Parent implements IRule {
@Override
public ICommand[] getCommands() {
IDirective[] directives = getDirectives();
- ArrayList<IDirective> cmds = new ArrayList<IDirective>(directives.length);
+ ArrayList<IDirective> cmds = new ArrayList<>(directives.length);
for (int i = 0; i < directives.length; i++) {
if (directives[i] instanceof ICommand) {
cmds.add(directives[i]);
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefile.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefile.java
index c173fe8aee..198f2ce6f6 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefile.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefile.java
@@ -169,8 +169,8 @@ public class GNUMakefile extends AbstractMakefile implements IGNUMakefile {
protected void parse(URI fileURI, MakefileReader reader) throws IOException {
String line;
Rule[] rules = null;
- Stack<Directive> conditions = new Stack<Directive>();
- Stack<VariableDefinition> defines = new Stack<VariableDefinition>();
+ Stack<Directive> conditions = new Stack<>();
+ Stack<VariableDefinition> defines = new Stack<>();
int startLine = 0;
int endLine = 0;
@@ -585,7 +585,7 @@ public class GNUMakefile extends AbstractMakefile implements IGNUMakefile {
String[] directories;
StringTokenizer st = new StringTokenizer(line);
int count = st.countTokens();
- List<String> dirs = new ArrayList<String>(count);
+ List<String> dirs = new ArrayList<>(count);
if (count > 0) {
for (int i = 0; i < count; i++) {
if (count == 0) {
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefileChecker.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefileChecker.java
index c22fa966e3..8390bd2bce 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefileChecker.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/gnu/GNUMakefileChecker.java
@@ -61,7 +61,7 @@ public class GNUMakefileChecker extends ACBuilder {
}
}
- protected Map<IProject, IMakefileValidator> validatorMap = new HashMap<IProject, IMakefileValidator>();
+ protected Map<IProject, IMakefileValidator> validatorMap = new HashMap<>();
public GNUMakefileChecker() {
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/posix/PosixMakefileUtil.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/posix/PosixMakefileUtil.java
index 9e73295b69..ee010717af 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/posix/PosixMakefileUtil.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/makefile/posix/PosixMakefileUtil.java
@@ -28,7 +28,7 @@ public class PosixMakefileUtil {
}
public static String[] findTargets(String line) {
- List<String> aList = new ArrayList<String>();
+ List<String> aList = new ArrayList<>();
int space;
// Trim away trailing and prepending spaces.
line = line.trim();
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/CDataDiscoveredInfoCalculator.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/CDataDiscoveredInfoCalculator.java
index 68e7bbfb37..5700e094e0 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/CDataDiscoveredInfoCalculator.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/CDataDiscoveredInfoCalculator.java
@@ -100,7 +100,7 @@ public class CDataDiscoveredInfoCalculator {
void add(ILangSettingInfo info) {
if (fLangInfoList == null)
- fLangInfoList = new ArrayList<ILangSettingInfo>();
+ fLangInfoList = new ArrayList<>();
fLangInfoList.add(info);
}
}
@@ -140,9 +140,9 @@ public class CDataDiscoveredInfoCalculator {
}
public void add(int index, PathFilePathInfo value) {
- List<PathFilePathInfo> list = checkResize(index) ? new ArrayList<PathFilePathInfo>() : fStore[index];
+ List<PathFilePathInfo> list = checkResize(index) ? new ArrayList<>() : fStore[index];
if (list == null) {
- list = new ArrayList<PathFilePathInfo>();
+ list = new ArrayList<>();
fStore[index] = list;
}
@@ -168,7 +168,7 @@ public class CDataDiscoveredInfoCalculator {
public List<PathFilePathInfo>[] getLists() {
int size = fMaxIndex + 1;
- List<List<PathFilePathInfo>> list = new ArrayList<List<PathFilePathInfo>>(size);
+ List<List<PathFilePathInfo>> list = new ArrayList<>(size);
List<PathFilePathInfo> l;
for (int i = 0; i < size; i++) {
l = fStore[i];
@@ -222,13 +222,13 @@ public class CDataDiscoveredInfoCalculator {
public void add(PathFilePathInfo pInfo) {
if (fPathFilePathInfoMap == null)
- fPathFilePathInfoMap = new HashMap<PathInfo, List<PathFilePathInfo>>(3);
+ fPathFilePathInfoMap = new HashMap<>(3);
PathInfo fileInfo = pInfo.fInfo;
List<PathFilePathInfo> list = fileInfo == fMaxMatchInfo ? fMaxMatchInfoList
: fPathFilePathInfoMap.get(fileInfo);
if (list == null) {
- list = new ArrayList<PathFilePathInfo>();
+ list = new ArrayList<>();
fPathFilePathInfoMap.put(fileInfo, list);
if (fMaxMatchInfo == null) {
fMaxMatchInfo = fileInfo;
@@ -342,7 +342,7 @@ public class CDataDiscoveredInfoCalculator {
private HashSet<String> calcExtsSet() {
if (fExtsSet == null)
- fExtsSet = new HashSet<String>(Arrays.asList(fExts));
+ fExtsSet = new HashSet<>(Arrays.asList(fExts));
return fExtsSet;
}
@@ -468,7 +468,7 @@ public class CDataDiscoveredInfoCalculator {
void internalAdd(ExtsSetSettings setting) {
if (fExtsSetToExtsSetSettingsMap == null) {
- fExtsSetToExtsSetSettingsMap = new HashMap<ExtsSet, ExtsSetSettings>();
+ fExtsSetToExtsSetSettingsMap = new HashMap<>();
}
ExtsSetSettings cur = fExtsSetToExtsSetSettingsMap.get(setting.fExtsSet);
@@ -497,7 +497,7 @@ public class CDataDiscoveredInfoCalculator {
}
public RcSetSettings[] getChildren(final boolean includeCurrent) {
- final List<Object> list = new ArrayList<Object>();
+ final List<Object> list = new ArrayList<>();
fContainer.accept(new IPathSettingsContainerVisitor() {
@Override
@@ -561,7 +561,7 @@ public class CDataDiscoveredInfoCalculator {
String[] exts = setting.fExtsSet.fExts;
String ext;
if (map == null) {
- map = new HashMap<String, ExtsSetSettings>();
+ map = new HashMap<>();
forceAdd = true;
}
@@ -600,7 +600,7 @@ public class CDataDiscoveredInfoCalculator {
path = rcData.getPath();
curRcSet = rcSet.createChild(path, rcData, false);
if (rcData.getType() == ICSettingBase.SETTING_FILE) {
- fileMap = new HashMap<ExtsSet, ExtsSetSettings>(1);
+ fileMap = new HashMap<>(1);
fileSetting = createExtsSetSettings(path, (CFileData) rcData);
fileMap.put(fileSetting.fExtsSet, fileSetting);
curRcSet.internalSetSettingsMap(fileMap);
@@ -672,7 +672,7 @@ public class CDataDiscoveredInfoCalculator {
private static void addLanguageInfos(RcSettingInfo rcInfo, CLanguageData[] lDatas, PathInfo info) {
ArrayList<ILangSettingInfo> list = rcInfo.fLangInfoList;
if (list == null) {
- list = new ArrayList<ILangSettingInfo>(lDatas.length);
+ list = new ArrayList<>(lDatas.length);
rcInfo.fLangInfoList = list;
} else {
list.ensureCapacity(lDatas.length);
@@ -690,7 +690,7 @@ public class CDataDiscoveredInfoCalculator {
IPath projRelPath;
CResourceData rcData;
// RcSetSettings dataSetting;
- List<RcSettingInfo> list = new ArrayList<RcSettingInfo>(pfpis.length);
+ List<RcSettingInfo> list = new ArrayList<>(pfpis.length);
RcSettingInfo rcInfo;
ILangSettingInfo lInfo;
CLanguageData lData;
@@ -731,7 +731,7 @@ public class CDataDiscoveredInfoCalculator {
if (rcInfo == null) {
rcInfo = new RcSettingInfo(rootData);
- tmpList = new ArrayList<ILangSettingInfo>(lDatas.length - k);
+ tmpList = new ArrayList<>(lDatas.length - k);
rcInfo.fLangInfoList = tmpList;
}
@@ -785,7 +785,7 @@ public class CDataDiscoveredInfoCalculator {
if (lData != null) {
rcInfo = new RcSettingInfo(rcData);
lInfo = new LangSettingInfo(lData, pInfo);
- tmpList = new ArrayList<ILangSettingInfo>(1);
+ tmpList = new ArrayList<>(1);
tmpList.add(lInfo);
rcInfo.fLangInfoList = tmpList;
list.add(rcInfo);
@@ -814,7 +814,7 @@ public class CDataDiscoveredInfoCalculator {
RcSetSettings settings[] = rootSetting.getChildren(true);
RcSetSettings setting;
CResourceData rcData;
- List<IRcSettingInfo> resultList = new ArrayList<IRcSettingInfo>();
+ List<IRcSettingInfo> resultList = new ArrayList<>();
LangSettingInfo langInfo;
RcSettingInfo rcInfo;
PathInfo pathInfo;
@@ -846,7 +846,7 @@ public class CDataDiscoveredInfoCalculator {
if (pathInfo != null) {
langInfo = new LangSettingInfo(extSetting.fBaseLangData, pathInfo);
rcInfo = new RcSettingInfo(rcData);
- rcInfo.fLangInfoList = new ArrayList<ILangSettingInfo>(1);
+ rcInfo.fLangInfoList = new ArrayList<>(1);
rcInfo.fLangInfoList.add(langInfo);
resultList.add(rcInfo);
}
@@ -854,7 +854,7 @@ public class CDataDiscoveredInfoCalculator {
} else {
if (setting.fExtsSetToExtsSetSettingsMap.size() != 0) {
rcInfo = new RcSettingInfo(rcData);
- rcInfo.fLangInfoList = new ArrayList<ILangSettingInfo>(setting.fExtsSetToExtsSetSettingsMap.size());
+ rcInfo.fLangInfoList = new ArrayList<>(setting.fExtsSetToExtsSetSettingsMap.size());
resultList.add(rcInfo);
Collection<ExtsSetSettings> extSettings = setting.fExtsSetToExtsSetSettingsMap.values();
@@ -1015,7 +1015,7 @@ public class CDataDiscoveredInfoCalculator {
private static HashMap<ExtsSet, ExtsSetSettings> createExtsSetSettingsMap(CFolderData data) {
CLanguageData[] lDatas = data.getLanguageDatas();
- HashMap<ExtsSet, ExtsSetSettings> map = new HashMap<ExtsSet, ExtsSetSettings>(lDatas.length);
+ HashMap<ExtsSet, ExtsSetSettings> map = new HashMap<>(lDatas.length);
ExtsSetSettings settings;
if (lDatas.length != 0) {
@@ -1032,7 +1032,7 @@ public class CDataDiscoveredInfoCalculator {
private static PathFilePathInfo[] createOrderedInfo(Map<IResource, PathInfo> map) {
ListIndexStore store = new ListIndexStore(10);
- HashMap<PathInfo, PathInfo> infoMap = new HashMap<PathInfo, PathInfo>();
+ HashMap<PathInfo, PathInfo> infoMap = new HashMap<>();
// LinkedHashMap result;
Set<Entry<IResource, PathInfo>> entries = map.entrySet();
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredPathContainer.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredPathContainer.java
index 4fccc0ade9..d37fd8cf44 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredPathContainer.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredPathContainer.java
@@ -79,7 +79,7 @@ public class DiscoveredPathContainer implements IPathEntryContainer {
IDiscoveredPathInfo info = MakeCorePlugin.getDefault().getDiscoveryManager().getDiscoveredInfo(fProject);
IPath[] includes = info.getIncludePaths();
Map<String, String> syms = info.getSymbols();
- List<IPathEntry> entries = new ArrayList<IPathEntry>(includes.length + syms.size());
+ List<IPathEntry> entries = new ArrayList<>(includes.length + syms.size());
for (IPath inc : includes) {
entries.add(CoreModel.newIncludeEntry(Path.EMPTY, Path.EMPTY, inc, true));
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredPathInfo.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredPathInfo.java
index 308a6564a3..00a1321943 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredPathInfo.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredPathInfo.java
@@ -49,8 +49,8 @@ public class DiscoveredPathInfo implements IPerProjectDiscoveredPathInfo, IDisco
public DiscoveredPathInfo(IProject project) {
this.project = project;
- discoveredPaths = new LinkedHashMap<String, Boolean>();
- discoveredSymbols = new LinkedHashMap<String, SymbolEntry>();
+ discoveredPaths = new LinkedHashMap<>();
+ discoveredSymbols = new LinkedHashMap<>();
}
@Override
@@ -77,12 +77,12 @@ public class DiscoveredPathInfo implements IPerProjectDiscoveredPathInfo, IDisco
@Override
public LinkedHashMap<String, Boolean> getIncludeMap() {
- return new LinkedHashMap<String, Boolean>(discoveredPaths);
+ return new LinkedHashMap<>(discoveredPaths);
}
@Override
public synchronized void setIncludeMap(LinkedHashMap<String, Boolean> paths) {
- discoveredPaths = SafeStringInterner.safeIntern(new LinkedHashMap<String, Boolean>(paths));
+ discoveredPaths = SafeStringInterner.safeIntern(new LinkedHashMap<>(paths));
activePaths = null;
}
@@ -104,12 +104,12 @@ public class DiscoveredPathInfo implements IPerProjectDiscoveredPathInfo, IDisco
@Override
public LinkedHashMap<String, SymbolEntry> getSymbolMap() {
- return new LinkedHashMap<String, SymbolEntry>(discoveredSymbols);
+ return new LinkedHashMap<>(discoveredSymbols);
}
@Override
public synchronized void setSymbolMap(LinkedHashMap<String, SymbolEntry> symbols) {
- discoveredSymbols = SafeStringInterner.safeIntern(new LinkedHashMap<String, SymbolEntry>(symbols));
+ discoveredSymbols = SafeStringInterner.safeIntern(new LinkedHashMap<>(symbols));
activeSymbols = null;
}
@@ -125,14 +125,14 @@ public class DiscoveredPathInfo implements IPerProjectDiscoveredPathInfo, IDisco
private List<Path> getActivePathList() {
if (activePaths == null) {
- activePaths = new ArrayList<Path>();
+ activePaths = new ArrayList<>();
}
return activePaths;
}
private Map<String, String> getActiveSymbolsMap() {
if (activeSymbols == null) {
- activeSymbols = new HashMap<String, String>();
+ activeSymbols = new HashMap<>();
}
return activeSymbols;
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredPathManager.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredPathManager.java
index 61800a1a04..02e79c7cfc 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredPathManager.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredPathManager.java
@@ -52,7 +52,7 @@ import org.eclipse.core.runtime.Status;
public class DiscoveredPathManager implements IDiscoveredPathManager, IResourceChangeListener {
- private Map<IProject, DiscoveredInfoHolder> fDiscoveredInfoHolderMap = new HashMap<IProject, DiscoveredInfoHolder>();
+ private Map<IProject, DiscoveredInfoHolder> fDiscoveredInfoHolderMap = new HashMap<>();
private List<IDiscoveredInfoListener> listeners = Collections
.synchronizedList(new ArrayList<IDiscoveredInfoListener>());
@@ -60,7 +60,7 @@ public class DiscoveredPathManager implements IDiscoveredPathManager, IResourceC
private static final int INFO_REMOVED = 2;
private static class DiscoveredInfoHolder {
- Map<InfoContext, IDiscoveredPathInfo> fInfoMap = new HashMap<InfoContext, IDiscoveredPathInfo>();
+ Map<InfoContext, IDiscoveredPathInfo> fInfoMap = new HashMap<>();
// PathSettingsContainer fContainer = PathSettingsContainer.createRootContainer();
public IDiscoveredPathInfo getInfo(InfoContext context) {
@@ -339,7 +339,7 @@ public class DiscoveredPathManager implements IDiscoveredPathManager, IResourceC
PerFileDiscoveredPathContainer container = new PerFileDiscoveredPathContainer(project);
CoreModel.setPathEntryContainer(new ICProject[] { cProject }, container, null);
if (changedResources != null) {
- List<PathEntryContainerChanged> changeDelta = new ArrayList<PathEntryContainerChanged>(
+ List<PathEntryContainerChanged> changeDelta = new ArrayList<>(
changedResources.size());
for (IResource resource : changedResources) {
IPath path = resource.getFullPath();
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredScannerInfoStore.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredScannerInfoStore.java
index f8a2707ccc..8d21940641 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredScannerInfoStore.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/DiscoveredScannerInfoStore.java
@@ -76,7 +76,7 @@ public final class DiscoveredScannerInfoStore {
/**
* Caches scanner config XML Documents per project using soft references.
*/
- private final Map<IProject, Reference<Document>> fDocumentCache = new HashMap<IProject, Reference<Document>>();
+ private final Map<IProject, Reference<Document>> fDocumentCache = new HashMap<>();
public static DiscoveredScannerInfoStore getInstance() {
if (instance == null) {
@@ -179,7 +179,7 @@ public final class DiscoveredScannerInfoStore {
rootElement.setAttribute(ID_ATTR, CDESCRIPTOR_ID);
document.appendChild(rootElement);
}
- fDocumentCache.put(project, new SoftReference<Document>(document));
+ fDocumentCache.put(project, new SoftReference<>(document));
} catch (IOException e) {
MakeCorePlugin.log(e);
throw new CoreException(new Status(IStatus.ERROR, MakeCorePlugin.getUniqueIdentifier(), -1,
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/PerFileDiscoveredPathContainer.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/PerFileDiscoveredPathContainer.java
index 94f53c116e..dbb4d03c2b 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/PerFileDiscoveredPathContainer.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/PerFileDiscoveredPathContainer.java
@@ -37,7 +37,7 @@ public class PerFileDiscoveredPathContainer extends DiscoveredPathContainer impl
@Override
public IPathEntry[] getPathEntries(IPath path, int mask) {
- ArrayList<IPathEntry> entries = new ArrayList<IPathEntry>();
+ ArrayList<IPathEntry> entries = new ArrayList<>();
try {
IDiscoveredPathInfo info = MakeCorePlugin.getDefault().getDiscoveryManager().getDiscoveredInfo(fProject);
if (info instanceof IPerFileDiscoveredPathInfo) {
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/ScannerConfigUtil.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/ScannerConfigUtil.java
index a03c3b98cc..f76e7e378c 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/ScannerConfigUtil.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/ScannerConfigUtil.java
@@ -66,7 +66,7 @@ public final class ScannerConfigUtil {
*/
public static List<String> scSymbolsSymbolEntryMap2List(Map<String, SymbolEntry> sumSymbols, boolean active) {
Set<Entry<String, SymbolEntry>> symbols = sumSymbols.entrySet();
- List<String> rv = new ArrayList<String>(symbols.size());
+ List<String> rv = new ArrayList<>(symbols.size());
for (Entry<String, SymbolEntry> symbol : symbols) {
SymbolEntry sEntry = symbol.getValue();
if (active) {
@@ -85,7 +85,7 @@ public final class ScannerConfigUtil {
* @return - active symbols as a plain Map
*/
public static Map<String, String> scSymbolEntryMap2Map(Map<String, SymbolEntry> sumSymbols) {
- Map<String, String> rv = new HashMap<String, String>();
+ Map<String, String> rv = new HashMap<>();
Set<String> keys = sumSymbols.keySet();
for (String key : keys) {
SymbolEntry entries = sumSymbols.get(key);
@@ -216,13 +216,13 @@ public final class ScannerConfigUtil {
if (index1 == index2 || !(index1 >= 0 && index1 < size && index2 >= 0 && index2 < size)) {
return sumPaths;
}
- ArrayList<String> pathKeyList = new ArrayList<String>(sumPaths.keySet());
+ ArrayList<String> pathKeyList = new ArrayList<>(sumPaths.keySet());
String temp1 = pathKeyList.get(index1);
String temp2 = pathKeyList.get(index2);
pathKeyList.set(index1, temp2);
pathKeyList.set(index2, temp1);
- LinkedHashMap<String, SymbolEntry> newSumPaths = new LinkedHashMap<String, SymbolEntry>(sumPaths.size());
+ LinkedHashMap<String, SymbolEntry> newSumPaths = new LinkedHashMap<>(sumPaths.size());
for (String key : pathKeyList) {
newSumPaths.put(key, sumPaths.get(key));
}
@@ -233,7 +233,7 @@ public final class ScannerConfigUtil {
* Tokenizes string with quotes
*/
public static String[] tokenizeStringWithQuotes(String line, String quoteStyle) {
- ArrayList<String> allTokens = new ArrayList<String>();
+ ArrayList<String> allTokens = new ArrayList<>();
String[] tokens = line.split(quoteStyle);
for (int i = 0; i < tokens.length; ++i) {
if (i % 2 == 0) { // even tokens need further tokenization
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParser.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParser.java
index e869b3a798..f900025c97 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParser.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParser.java
@@ -187,8 +187,8 @@ public abstract class AbstractGCCBOPConsoleParser implements IScannerInfoConsole
* @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<>();
StringBuilder token = new StringBuilder();
final char[] input = line.toCharArray();
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParserUtility.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParserUtility.java
index f6abd11f19..9b6eb9b988 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParserUtility.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/AbstractGCCBOPConsoleParserUtility.java
@@ -42,8 +42,8 @@ public abstract class AbstractGCCBOPConsoleParserUtility {
*/
public AbstractGCCBOPConsoleParserUtility(IProject project, IPath workingDirectory,
IMarkerGenerator markerGenerator) {
- fDirectoryStack = new Vector<IPath>();
- fErrors = new ArrayList<Problem>();
+ fDirectoryStack = new Vector<>();
+ fErrors = new ArrayList<>();
this.project = project;
fBaseDirectory = new Path(EFSExtensionManager.getDefault().getPathFromURI(project.getLocationURI()));
if (workingDirectory != null) {
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileBOPConsoleParser.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileBOPConsoleParser.java
index 354248e07e..0f4ab75ea4 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileBOPConsoleParser.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileBOPConsoleParser.java
@@ -138,9 +138,9 @@ public class GCCPerFileBOPConsoleParser extends AbstractGCCBOPConsoleParser {
}
if (file != null) {
CCommandDSC cmd = fUtil.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);
} else
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileBOPConsoleParserUtility.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileBOPConsoleParserUtility.java
index 51774fab88..e550d21800 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileBOPConsoleParserUtility.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileBOPConsoleParserUtility.java
@@ -61,7 +61,7 @@ public class GCCPerFileBOPConsoleParserUtility extends AbstractGCCBOPConsolePars
String workingDir = getWorkingDirectory().toString();
List<Map<String, List<String>>> directoryCommandList = directoryCommandListMap.get(workingDir);
if (directoryCommandList == null) {
- directoryCommandList = new CopyOnWriteArrayList<Map<String, List<String>>>();
+ directoryCommandList = new CopyOnWriteArrayList<>();
directoryCommandListMap.put(workingDir, directoryCommandList);
++workingDirsN;
}
@@ -77,10 +77,10 @@ public class GCCPerFileBOPConsoleParserUtility extends AbstractGCCBOPConsolePars
return;
}
}
- command21FileListMap = new HashMap<String, List<String>>(1);
+ command21FileListMap = new HashMap<>(1);
directoryCommandList.add(command21FileListMap);
++commandsN;
- List<String> fileList = new CopyOnWriteArrayList<String>();
+ List<String> fileList = new CopyOnWriteArrayList<>();
command21FileListMap.put(genericCommand, fileList);
fileList.add(longFileName);
++filesN;
@@ -123,8 +123,8 @@ public class GCCPerFileBOPConsoleParserUtility extends AbstractGCCBOPConsolePars
* @return CCommandDSC compile command description
*/
public CCommandDSC getNewCCommandDSC(String[] tokens, final int idxOfCompilerCommand, boolean cppFileType) {
- CopyOnWriteArrayList<KVStringPair> dirafter = new CopyOnWriteArrayList<KVStringPair>();
- CopyOnWriteArrayList<String> includes = new CopyOnWriteArrayList<String>();
+ CopyOnWriteArrayList<KVStringPair> dirafter = new CopyOnWriteArrayList<>();
+ CopyOnWriteArrayList<String> includes = new CopyOnWriteArrayList<>();
CCommandDSC command = new CCommandDSC(cppFileType, getProject());
command.addSCOption(new KVStringPair(SCDOptionsEnum.COMMAND.toString(), tokens[idxOfCompilerCommand]));
for (int i = idxOfCompilerCommand + 1; i < tokens.length; ++i) {
@@ -161,7 +161,7 @@ public class GCCPerFileBOPConsoleParserUtility extends AbstractGCCBOPConsolePars
KVStringPair pair = new KVStringPair(SCDOptionsEnum.IQUOTE.toString(), option);
command.addSCOption(pair);
}
- includes = new CopyOnWriteArrayList<String>();
+ includes = new CopyOnWriteArrayList<>();
// -I- has no parameter
} else {
// ex. -I /dir
@@ -279,7 +279,7 @@ public class GCCPerFileBOPConsoleParserUtility extends AbstractGCCBOPConsolePars
* @return List of CCommandDSC
*/
public List<CCommandDSC> getCCommandDSCList() {
- return new CopyOnWriteArrayList<CCommandDSC>(commandsList2);
+ return new CopyOnWriteArrayList<>(commandsList2);
}
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileSIPConsoleParser.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileSIPConsoleParser.java
index 32d2ed6f4b..58264bc0da 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileSIPConsoleParser.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCPerFileSIPConsoleParser.java
@@ -71,11 +71,11 @@ public class GCCPerFileSIPConsoleParser implements IScannerInfoConsoleParser {
if (line.startsWith(COMMAND_ID_BEGIN)) {
commandId = Integer.parseInt(line.substring(COMMAND_ID_BEGIN.length()));
- symbols = new ArrayList<String>();
- includes = new ArrayList<String>();
- quoteIncludes = new ArrayList<String>();
+ symbols = new ArrayList<>();
+ includes = new ArrayList<>();
+ quoteIncludes = new ArrayList<>();
} else if (line.startsWith(COMMAND_ID_END)) {
- Map<ScannerInfoTypes, List<String>> scannerInfo = new HashMap<ScannerInfoTypes, List<String>>();
+ Map<ScannerInfoTypes, List<String>> scannerInfo = new HashMap<>();
scannerInfo.put(ScannerInfoTypes.INCLUDE_PATHS, includes);
scannerInfo.put(ScannerInfoTypes.QUOTE_INCLUDE_PATHS, quoteIncludes);
scannerInfo.put(ScannerInfoTypes.SYMBOL_DEFINITIONS, symbols);
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCScannerInfoConsoleParser.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCScannerInfoConsoleParser.java
index e834b093a0..ee008d9357 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCScannerInfoConsoleParser.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCScannerInfoConsoleParser.java
@@ -74,9 +74,9 @@ public class GCCScannerInfoConsoleParser extends AbstractGCCBOPConsoleParser {
}
// 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++) {
@@ -165,7 +165,7 @@ public class GCCScannerInfoConsoleParser extends AbstractGCCBOPConsoleParser {
IProject project = getProject();
IFile file = null;
- List<String> translatedIncludes = new LinkedList<String>();
+ List<String> translatedIncludes = new LinkedList<>();
translatedIncludes.addAll(includes);
if (includes.size() > 0) {
if (fUtil != null) {
@@ -188,11 +188,11 @@ public class GCCScannerInfoConsoleParser extends AbstractGCCBOPConsoleParser {
}
}
- CopyOnWriteArrayList<String> translatedIncludesToPut = new CopyOnWriteArrayList<String>(translatedIncludes);
+ CopyOnWriteArrayList<String> translatedIncludesToPut = new CopyOnWriteArrayList<>(translatedIncludes);
// Contribute discovered includes and symbols to the ScannerInfoCollector
if (translatedIncludesToPut.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, translatedIncludesToPut);
scannerInfo.put(ScannerInfoTypes.SYMBOL_DEFINITIONS, symbols);
scannerInfo.put(ScannerInfoTypes.TARGET_SPECIFIC_OPTION, targetSpecificOptions);
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCSpecsConsoleParser.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCSpecsConsoleParser.java
index 48c69b6953..53e791fc04 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCSpecsConsoleParser.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/GCCSpecsConsoleParser.java
@@ -44,8 +44,8 @@ public class GCCSpecsConsoleParser implements IScannerInfoConsoleParser {
protected IScannerInfoCollector fCollector = null;
private boolean expectingIncludes = false;
- protected List<String> symbols = new ArrayList<String>();
- protected List<String> includes = new ArrayList<String>();
+ protected List<String> symbols = new ArrayList<>();
+ protected List<String> includes = new ArrayList<>();
@Override
public void startup(IProject project, IPath workingDirectory, IScannerInfoCollector collector,
@@ -120,7 +120,7 @@ public class GCCSpecsConsoleParser implements IScannerInfoConsoleParser {
*/
@Override
public void shutdown() {
- Map<ScannerInfoTypes, List<String>> scannerInfo = new HashMap<ScannerInfoTypes, List<String>>();
+ Map<ScannerInfoTypes, List<String>> scannerInfo = new HashMap<>();
scannerInfo.put(ScannerInfoTypes.INCLUDE_PATHS, includes);
scannerInfo.put(ScannerInfoTypes.SYMBOL_DEFINITIONS, symbols);
if (fCollector != null) {
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/ScannerInfoConsoleParserUtility.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/ScannerInfoConsoleParserUtility.java
index 0e270d2c62..11ab1e24c8 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/ScannerInfoConsoleParserUtility.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/gnu/ScannerInfoConsoleParserUtility.java
@@ -53,9 +53,9 @@ public class ScannerInfoConsoleParserUtility extends AbstractGCCBOPConsoleParser
public ScannerInfoConsoleParserUtility(IProject project, IPath workingDirectory, IMarkerGenerator markerGenerator) {
super(project, workingDirectory, markerGenerator);
- fFilesInProject = new HashMap<String, IFile>();
- fCollectedFiles = new ArrayList<IResource>();
- fNameConflicts = new ArrayList<String>();
+ fFilesInProject = new HashMap<>();
+ fCollectedFiles = new ArrayList<>();
+ fNameConflicts = new ArrayList<>();
collectFiles(getProject(), fCollectedFiles);
@@ -188,7 +188,7 @@ public class ScannerInfoConsoleParserUtility extends AbstractGCCBOPConsoleParser
}
public List<String> translateRelativePaths(IFile file, String fileName, List<String> includes) {
- List<String> translatedIncludes = new ArrayList<String>(includes.size());
+ List<String> translatedIncludes = new ArrayList<>(includes.size());
for (String include : includes) {
IPath includePath = new Path(include);
if (includePath.isUNC()) {
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/CCommandDSC.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/CCommandDSC.java
index c8ec3492bf..6270731096 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/CCommandDSC.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/CCommandDSC.java
@@ -63,13 +63,13 @@ public class CCommandDSC {
}
public CCommandDSC(boolean cppFileType, IProject project) {
- compilerCommand = new ArrayList<KVStringPair>();
+ compilerCommand = new ArrayList<>();
discovered = false;
this.cppFileType = cppFileType;
- symbols = new ArrayList<String>();
- includes = new ArrayList<String>();
- quoteIncludes = new ArrayList<String>();
+ symbols = new ArrayList<>();
+ includes = new ArrayList<>();
+ quoteIncludes = new ArrayList<>();
this.project = project;
}
@@ -181,7 +181,7 @@ public class CCommandDSC {
* @return list of strings
*/
public List<String> getImacrosFile() {
- List<String> imacrosFiles = new ArrayList<String>();
+ List<String> imacrosFiles = new ArrayList<>();
for (Iterator<KVStringPair> i = compilerCommand.iterator(); i.hasNext();) {
KVStringPair optionPair = i.next();
if (optionPair.getKey().equals(SCDOptionsEnum.IMACROS_FILE.toString())) {
@@ -195,7 +195,7 @@ public class CCommandDSC {
* @return list of strings
*/
public List<String> getIncludeFile() {
- List<String> includeFiles = new ArrayList<String>();
+ List<String> includeFiles = new ArrayList<>();
for (Iterator<KVStringPair> i = compilerCommand.iterator(); i.hasNext();) {
KVStringPair optionPair = i.next();
if (optionPair.getKey().equals(SCDOptionsEnum.INCLUDE_FILE.toString())) {
@@ -362,9 +362,9 @@ public class CCommandDSC {
public void resolveOptions(IProject project) {
if (!isDiscovered()) {
// that's wrong for sure, options cannot be resolved fron the optionPairs??
- ArrayList<String> symbols = new ArrayList<String>();
- ArrayList<String> includes = new ArrayList<String>();
- ArrayList<String> quoteincludes = new ArrayList<String>();
+ ArrayList<String> symbols = new ArrayList<>();
+ ArrayList<String> includes = new ArrayList<>();
+ ArrayList<String> quoteincludes = new ArrayList<>();
for (Iterator<KVStringPair> options = compilerCommand.iterator(); options.hasNext();) {
KVStringPair optionPair = options.next();
String key = optionPair.getKey();
@@ -410,7 +410,7 @@ public class CCommandDSC {
}
public static List<String> makeRelative(IProject project, List<String> paths) {
- List<String> list = new ArrayList<String>(paths.size());
+ List<String> list = new ArrayList<>(paths.size());
for (Iterator<String> iter = paths.iterator(); iter.hasNext();) {
String path = iter.next();
path = makeRelative(project, new Path(path)).toOSString();
@@ -439,7 +439,7 @@ public class CCommandDSC {
}
public static List<String> makeAbsolute(IProject project, List<String> paths) {
- List<String> list = new ArrayList<String>(paths.size());
+ List<String> list = new ArrayList<>(paths.size());
for (Iterator<String> iter = paths.iterator(); iter.hasNext();) {
String path = iter.next();
path = makeAbsolute(project, path);
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/CygpathTranslator.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/CygpathTranslator.java
index 5ed1a7e566..4ece541085 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/CygpathTranslator.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/CygpathTranslator.java
@@ -111,7 +111,7 @@ public class CygpathTranslator {
useCygwinFromPath = Cygwin.isAvailable(envPath);
}
- List<String> translatedIncludePaths = new ArrayList<String>();
+ List<String> translatedIncludePaths = new ArrayList<>();
for (Iterator<String> i = sumIncludes.iterator(); i.hasNext();) {
String includePath = i.next();
IPath realPath = new Path(includePath);
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/SymbolEntry.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/SymbolEntry.java
index 9b01afc671..46e0097125 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/SymbolEntry.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/SymbolEntry.java
@@ -37,7 +37,7 @@ public class SymbolEntry {
public SymbolEntry(String name, String value, boolean active) {
this.name = SafeStringInterner.safeIntern(name);
if (values == null) {
- values = new LinkedHashMap<String, Boolean>(1);
+ values = new LinkedHashMap<>(1);
}
values.put(SafeStringInterner.safeIntern(value), Boolean.valueOf(active));
}
@@ -88,7 +88,7 @@ public class SymbolEntry {
* @return List
*/
private List<String> get(boolean format, boolean subset, boolean active) {
- List<String> rv = new ArrayList<String>(values.size());
+ List<String> rv = new ArrayList<>(values.size());
for (String val : values.keySet()) {
if (subset && (values.get(val)).booleanValue() != active)
continue;
@@ -106,7 +106,7 @@ public class SymbolEntry {
* @return List
*/
public List<String> getValuesOnly(boolean active) {
- List<String> rv = new ArrayList<String>(values.size());
+ List<String> rv = new ArrayList<>(values.size());
for (Object element : values.keySet()) {
String val = (String) element;
if ((values.get(val)).booleanValue() == active) {
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/DefaultRunSIProvider.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/DefaultRunSIProvider.java
index fb3e725896..6bc426ebaf 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/DefaultRunSIProvider.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/DefaultRunSIProvider.java
@@ -131,7 +131,7 @@ public class DefaultRunSIProvider implements IExternalScannerInfoProvider {
ErrorParserManager epm = new ErrorParserManager(project, markerGenerator,
new String[] { GMAKE_ERROR_PARSER_ID });
- List<IConsoleParser> parsers = new ArrayList<IConsoleParser>();
+ List<IConsoleParser> parsers = new ArrayList<>();
IConsoleParser parser = ScannerInfoConsoleParserFactory.getESIConsoleParser(project, context,
providerId, buildInfo, collector, markerGenerator);
if (parser != null) {
@@ -229,7 +229,7 @@ public class DefaultRunSIProvider implements IExternalScannerInfoProvider {
protected String[] setEnvironment(ICommandLauncher launcher, Properties initialEnv) {
Properties props = getEnvMap(launcher, initialEnv);
String[] env = null;
- ArrayList<String> envList = new ArrayList<String>();
+ ArrayList<String> envList = new ArrayList<>();
Enumeration<?> names = props.propertyNames();
if (names != null) {
while (names.hasMoreElements()) {
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/PerFileSICollector.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/PerFileSICollector.java
index 07793c7211..2fb9bb3202 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/PerFileSICollector.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/PerFileSICollector.java
@@ -75,9 +75,9 @@ public class PerFileSICollector implements IScannerInfoCollector3, IScannerInfoC
protected final Map<Integer, CCommandDSC> commandIdCommandMap; // map of all commands
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)
@@ -88,7 +88,7 @@ public class PerFileSICollector implements IScannerInfoCollector3, IScannerInfoC
synchronized (PerFileSICollector.this.fLock) {
Document doc = collectorElem.getOwnerDocument();
- List<Integer> commandIds = new ArrayList<Integer>(commandIdCommandMap.keySet());
+ List<Integer> commandIds = new ArrayList<>(commandIdCommandMap.keySet());
Collections.sort(commandIds);
for (Integer commandId : commandIds) {
CCommandDSC command = commandIdCommandMap.get(commandId);
@@ -201,10 +201,10 @@ public class PerFileSICollector implements IScannerInfoCollector3, IScannerInfoC
sid = new ScannerInfoData();
// siChangedForFileList = new ArrayList();
- siChangedForFileMap = new HashMap<IFile, Integer>();
- siChangedForCommandIdList = new ArrayList<Integer>();
+ siChangedForFileMap = new HashMap<>();
+ siChangedForCommandIdList = new ArrayList<>();
- freeCommandIdPool = new TreeSet<Integer>();
+ freeCommandIdPool = new TreeSet<>();
}
/* (non-Javadoc)
@@ -300,7 +300,7 @@ public class PerFileSICollector implements IScannerInfoCollector3, IScannerInfoC
protected void addCompilerCommand(IFile file, CCommandDSC cmd) {
assert Thread.holdsLock(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);
@@ -344,7 +344,7 @@ public class PerFileSICollector implements IScannerInfoCollector3, IScannerInfoC
// 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) {
@@ -435,7 +435,7 @@ public class PerFileSICollector implements IScannerInfoCollector3, IScannerInfoC
if (scannerInfoChanged()) {
applyFileDeltas();
removeUnusedCommands();
- changedResources = new ArrayList<IResource>(siChangedForFileMap.keySet());
+ changedResources = new ArrayList<>(siChangedForFileMap.keySet());
siChangedForFileMap.clear();
}
siChangedForCommandIdList.clear();
@@ -480,7 +480,7 @@ public class PerFileSICollector implements IScannerInfoCollector3, IScannerInfoC
*/
@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) {
@@ -628,7 +628,7 @@ public class PerFileSICollector implements IScannerInfoCollector3, IScannerInfoC
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()]);
@@ -693,7 +693,7 @@ public class PerFileSICollector implements IScannerInfoCollector3, IScannerInfoC
CCommandDSC cmd = getCommand(path);
if (cmd != null && cmd.isDiscovered()) {
List<String> symbols = cmd.getSymbols();
- Map<String, String> definedSymbols = new HashMap<String, String>(symbols.size());
+ Map<String, String> definedSymbols = new HashMap<>(symbols.size());
for (String symbol : symbols) {
String key = SafeStringInterner.safeIntern(ScannerConfigUtil.getSymbolKey(symbol));
String value = SafeStringInterner.safeIntern(ScannerConfigUtil.getSymbolValue(symbol));
@@ -789,7 +789,7 @@ public class PerFileSICollector implements IScannerInfoCollector3, IScannerInfoC
protected Map<IResource, PathInfo> calculatePathInfoMap() {
assert Thread.holdsLock(fLock);
- Map<IResource, PathInfo> map = new HashMap<IResource, PathInfo>(sid.fileToCommandIdMap.size() + 1);
+ Map<IResource, PathInfo> map = new HashMap<>(sid.fileToCommandIdMap.size() + 1);
Set<Entry<IFile, Integer>> entrySet = sid.fileToCommandIdMap.entrySet();
for (Entry<IFile, Integer> entry : entrySet) {
IFile file = entry.getKey();
@@ -821,7 +821,7 @@ public class PerFileSICollector implements IScannerInfoCollector3, IScannerInfoC
IPath[] incFiles = stringListToPathArray(cmd.getIncludeFile());
IPath[] macroFiles = stringListToPathArray(cmd.getImacrosFile());
List<String> symbols = cmd.getSymbols();
- Map<String, String> definedSymbols = new HashMap<String, String>(symbols.size());
+ Map<String, String> definedSymbols = new HashMap<>(symbols.size());
for (String symbol : symbols) {
String key = ScannerConfigUtil.getSymbolKey(symbol);
String value = ScannerConfigUtil.getSymbolValue(symbol);
@@ -862,7 +862,7 @@ public class PerFileSICollector implements IScannerInfoCollector3, IScannerInfoC
* @return list of IPath(s).
*/
protected IPath[] getAllIncludePaths(int type) {
- List<String> allIncludes = new ArrayList<String>();
+ List<String> allIncludes = new ArrayList<>();
Set<Integer> cmdIds = sid.commandIdCommandMap.keySet();
for (Integer cmdId : cmdIds) {
CCommandDSC cmd = sid.commandIdCommandMap.get(cmdId);
@@ -882,7 +882,7 @@ public class PerFileSICollector implements IScannerInfoCollector3, IScannerInfoC
discovered = cmd.getImacrosFile();
break;
default:
- discovered = new ArrayList<String>(0);
+ discovered = new ArrayList<>(0);
}
for (String include : discovered) {
// the following line degrades perfomance
@@ -899,7 +899,7 @@ public class PerFileSICollector implements IScannerInfoCollector3, IScannerInfoC
}
protected static IPath[] stringListToPathArray(List<String> discovered) {
- List<Path> allIncludes = new ArrayList<Path>(discovered.size());
+ List<Path> allIncludes = new ArrayList<>(discovered.size());
for (String include : discovered) {
if (!allIncludes.contains(include)) {
allIncludes.add(new Path(include));
@@ -910,7 +910,7 @@ public class PerFileSICollector implements IScannerInfoCollector3, IScannerInfoC
protected Map<String, String> getAllSymbols() {
assert Thread.holdsLock(fLock);
- Map<String, String> symbols = new HashMap<String, String>();
+ Map<String, String> symbols = new HashMap<>();
Set<Integer> cmdIds = sid.commandIdCommandMap.keySet();
for (Integer cmdId : cmdIds) {
CCommandDSC cmd = sid.commandIdCommandMap.get(cmdId);
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/PerProjectSICollector.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/PerProjectSICollector.java
index 63acee31c1..70b5171ddf 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/PerProjectSICollector.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/PerProjectSICollector.java
@@ -85,13 +85,13 @@ public class PerProjectSICollector implements IScannerInfoCollector3, IScannerIn
protected boolean scPersisted = false;
public PerProjectSICollector() {
- discoveredSI = new HashMap<ScannerInfoTypes, List<String>>();
+ discoveredSI = new HashMap<>();
// discoveredIncludes = new ArrayList();
// discoveredSymbols = new ArrayList();
// discoveredTSO = new ArrayList();
//
- sumDiscoveredIncludes = new ArrayList<String>();
- sumDiscoveredSymbols = new LinkedHashMap<String, SymbolEntry>();
+ sumDiscoveredIncludes = new ArrayList<>();
+ sumDiscoveredSymbols = new LinkedHashMap<>();
}
/* (non-Javadoc)
@@ -151,7 +151,7 @@ public class PerProjectSICollector implements IScannerInfoCollector3, IScannerIn
List<String> discovered = discoveredSI.get(siType);
if (discovered == null) {
- discovered = new ArrayList<String>(delta);
+ discovered = new ArrayList<>(delta);
discoveredSI.put(siType, discovered);
} else {
final boolean addSorted = !isBuiltinConfig && siType.equals(ScannerInfoTypes.INCLUDE_PATHS);
@@ -224,7 +224,7 @@ public class PerProjectSICollector implements IScannerInfoCollector3, IScannerIn
monitor.subTask(MakeMessages.getString("ScannerInfoCollector.Updating") + project.getName()); //$NON-NLS-1$
try {
// update scanner configuration
- List<IResource> resourceDelta = new ArrayList<IResource>(1);
+ List<IResource> resourceDelta = new ArrayList<>(1);
resourceDelta.add(project);
MakeCorePlugin.getDefault().getDiscoveryManager().updateDiscoveredInfo(context, pathInfo,
context.isDefaultContext(), resourceDelta);
@@ -275,12 +275,12 @@ public class PerProjectSICollector implements IScannerInfoCollector3, IScannerIn
// Step 3. Merge scanner config from steps 1 and 2
// order is important, use list to preserve it
- ArrayList<String> persistedKeyList = new ArrayList<String>(persistedIncludes.keySet());
+ ArrayList<String> persistedKeyList = new ArrayList<>(persistedIncludes.keySet());
addedIncludes = addItemsWithOrder(persistedKeyList, finalSumIncludes, true);
LinkedHashMap<String, Boolean> newPersistedIncludes;
if (addedIncludes) {
- newPersistedIncludes = new LinkedHashMap<String, Boolean>(persistedKeyList.size());
+ newPersistedIncludes = new LinkedHashMap<>(persistedKeyList.size());
for (String include : persistedKeyList) {
if (persistedIncludes.containsKey(include)) {
newPersistedIncludes.put(include, persistedIncludes.get(include));
@@ -338,7 +338,7 @@ public class PerProjectSICollector implements IScannerInfoCollector3, IScannerIn
LinkedHashMap<String, SymbolEntry> persistedSymbols = discPathInfo.getSymbolMap();
// Step 3. Merge scanner config from steps 1 and 2
- LinkedHashMap<String, SymbolEntry> candidateSymbols = new LinkedHashMap<String, SymbolEntry>(
+ LinkedHashMap<String, SymbolEntry> candidateSymbols = new LinkedHashMap<>(
persistedSymbols);
addedSymbols |= ScannerConfigUtil.scAddSymbolEntryMap2SymbolEntryMap(candidateSymbols,
sumDiscoveredSymbols);
@@ -519,7 +519,7 @@ public class PerProjectSICollector implements IScannerInfoCollector3, IScannerIn
ICProject cProject = CoreModel.getDefault().create(project);
if (cProject != null) {
IPathEntry[] entries = cProject.getRawPathEntries();
- List<IPathEntry> newEntries = new ArrayList<IPathEntry>(Arrays.asList(entries));
+ List<IPathEntry> newEntries = new ArrayList<>(Arrays.asList(entries));
if (!newEntries.contains(container)) {
newEntries.add(container);
cProject.setRawPathEntries(newEntries.toArray(new IPathEntry[newEntries.size()]), monitor);
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/SCMarkerGenerator.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/SCMarkerGenerator.java
index a062dcd0cb..81b4c16012 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/SCMarkerGenerator.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/SCMarkerGenerator.java
@@ -122,7 +122,7 @@ public class SCMarkerGenerator implements IMarkerGenerator {
try {
IMarker[] markers = file.findMarkers(ICModelMarker.C_MODEL_PROBLEM_MARKER, false, IResource.DEPTH_ONE);
if (markers != null) {
- List<IMarker> exactMarkers = new ArrayList<IMarker>();
+ List<IMarker> exactMarkers = new ArrayList<>();
for (int i = 0; i < markers.length; i++) {
IMarker marker = markers[i];
int location = ((Integer) marker.getAttribute(IMarker.LINE_NUMBER)).intValue();
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/ScannerConfigInfoFactory2.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/ScannerConfigInfoFactory2.java
index dd5d36a1ab..e7fe1a223e 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/ScannerConfigInfoFactory2.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/ScannerConfigInfoFactory2.java
@@ -218,7 +218,7 @@ public class ScannerConfigInfoFactory2 {
public void save() throws CoreException {
if (isDirty()) {
- Set<String> idSet = new HashSet<String>(fMap.size() - 1);
+ Set<String> idSet = new HashSet<>(fMap.size() - 1);
Preference pref = (Preference) fMap.get(new InfoContext(null));
pref.store();
@@ -278,7 +278,7 @@ public class ScannerConfigInfoFactory2 {
}
private static abstract class StoreSet implements IScannerConfigBuilderInfo2Set {
- protected HashMap<InfoContext, IScannerConfigBuilderInfo2> fMap = new HashMap<InfoContext, IScannerConfigBuilderInfo2>();
+ protected HashMap<InfoContext, IScannerConfigBuilderInfo2> fMap = new HashMap<>();
protected boolean fIsDirty;
StoreSet() {
@@ -363,9 +363,9 @@ public class ScannerConfigInfoFactory2 {
protected String selectedProfile = EMPTY_STRING;
/** Map from profile ID -> default ProfileOptions
* allows us to avoid storing options to .cproject when they are default .*/
- protected static Map<String, ProfileOptions> defaultProfiles = new ConcurrentHashMap<String, ProfileOptions>();
+ protected static Map<String, ProfileOptions> defaultProfiles = new ConcurrentHashMap<>();
/** Map from profile ID -> ProfileOptions */
- protected Map<String, ProfileOptions> profileOptionsMap = new LinkedHashMap<String, ProfileOptions>();
+ protected Map<String, ProfileOptions> profileOptionsMap = new LinkedHashMap<>();
static class ProfileOptions implements Cloneable {
protected boolean buildOutputFileActionEnabled;
@@ -457,7 +457,7 @@ public class ScannerConfigInfoFactory2 {
this.buildOutputFileActionEnabled = base.buildOutputFileActionEnabled;
this.buildOutputFilePath = base.buildOutputFilePath;
this.buildOutputParserEnabled = base.buildOutputParserEnabled;
- this.providerOptionsMap = new LinkedHashMap<String, ProviderOptions>(base.providerOptionsMap);
+ this.providerOptionsMap = new LinkedHashMap<>(base.providerOptionsMap);
for (Map.Entry<String, ProviderOptions> entry : providerOptionsMap.entrySet()) {
ProviderOptions basePo = entry.getValue();
entry.setValue(new ProviderOptions(basePo));
@@ -506,7 +506,7 @@ public class ScannerConfigInfoFactory2 {
try {
ProfileOptions newProfOpts = (ProfileOptions) super.clone();
if (providerOptionsMap != null) {
- newProfOpts.providerOptionsMap = new LinkedHashMap<String, ProviderOptions>();
+ newProfOpts.providerOptionsMap = new LinkedHashMap<>();
for (Map.Entry<String, ProviderOptions> e : providerOptionsMap.entrySet())
newProfOpts.providerOptionsMap.put(e.getKey(), e.getValue().clone());
}
@@ -597,7 +597,7 @@ public class ScannerConfigInfoFactory2 {
*/
@Override
public List<String> getProfileIdList() {
- return new ArrayList<String>(profileOptionsMap.keySet());
+ return new ArrayList<>(profileOptionsMap.keySet());
}
/* (non-Javadoc)
@@ -666,7 +666,7 @@ public class ScannerConfigInfoFactory2 {
@Override
public List<String> getProviderIdList() {
ProfileOptions po = profileOptionsMap.get(selectedProfile);
- return (po != null) ? new ArrayList<String>(po.providerOptionsMap.keySet()) : new ArrayList<String>(0);
+ return (po != null) ? new ArrayList<>(po.providerOptionsMap.keySet()) : new ArrayList<>(0);
}
/* (non-Javadoc)
@@ -856,7 +856,7 @@ public class ScannerConfigInfoFactory2 {
}
}
- po.providerOptionsMap = new LinkedHashMap<String, ProfileOptions.ProviderOptions>();
+ po.providerOptionsMap = new LinkedHashMap<>();
for (String providerId : configuredProfile.getSIProviderIds()) {
ProfileOptions.ProviderOptions ppo = new ProfileOptions.ProviderOptions();
ScannerInfoProvider configuredProvider = configuredProfile.getScannerInfoProviderElement(providerId);
@@ -987,10 +987,10 @@ public class ScannerConfigInfoFactory2 {
.getSCProfileConfiguration(selectedProfile);
// get the one and only provider id
String providerId = configuredProfile.getSIProviderIds().get(0);
- po.providerOptionsMap = new LinkedHashMap<String, ProfileOptions.ProviderOptions>(1);
+ po.providerOptionsMap = new LinkedHashMap<>(1);
po.providerOptionsMap.put(providerId, ppo);
- profileOptionsMap = new LinkedHashMap<String, ProfileOptions>(1);
+ profileOptionsMap = new LinkedHashMap<>(1);
profileOptionsMap.put(profileId, po);
// store migrated data
@@ -1012,7 +1012,7 @@ public class ScannerConfigInfoFactory2 {
.getSCProfileConfiguration(profileId);
List<String> providerIds = configuredProfile.getSIProviderIds();
int providerCounter = 0;
- po.providerOptionsMap = new LinkedHashMap<String, ProfileOptions.ProviderOptions>(providerIds.size());
+ po.providerOptionsMap = new LinkedHashMap<>(providerIds.size());
for (ICStorageElement child : profile.getChildren()) {
// buildOutputProvider element
@@ -1106,7 +1106,7 @@ public class ScannerConfigInfoFactory2 {
// ScannerConfigProfile configuredProfile = ScannerConfigProfileManager.getInstance().
// getSCProfileConfiguration(selectedProfile);
// List providerIds = configuredProfile.getSIProviderIds();
- List<String> providerIds = new ArrayList<String>(po.providerOptionsMap.keySet());
+ List<String> providerIds = new ArrayList<>(po.providerOptionsMap.keySet());
for (int i = 0; i < providerIds.size(); ++i) {
String providerId = providerIds.get(i);
ProfileOptions.ProviderOptions ppo = po.providerOptionsMap.get(providerId);
@@ -1221,7 +1221,7 @@ public class ScannerConfigInfoFactory2 {
.safeIntern(prefs.getDefaultString(prefix + SCANNER_CONFIG_SELECTED_PROFILE_ID_SUFFIX));
}
List<String> profileIds = ScannerConfigProfileManager.getInstance().getProfileIds(context);
- profileOptionsMap = new LinkedHashMap<String, ProfileOptions>(profileIds.size());
+ profileOptionsMap = new LinkedHashMap<>(profileIds.size());
for (String profileId : profileIds) {
ProfileOptions po = new ProfileOptions();
profileOptionsMap.put(profileId, po);
@@ -1240,7 +1240,7 @@ public class ScannerConfigInfoFactory2 {
ScannerConfigProfile configuredProfile = ScannerConfigProfileManager.getInstance()
.getSCProfileConfiguration(profileId);
List<String> providerIds = configuredProfile.getSIProviderIds();
- po.providerOptionsMap = new LinkedHashMap<String, ProfileOptions.ProviderOptions>(providerIds.size());
+ po.providerOptionsMap = new LinkedHashMap<>(providerIds.size());
for (String providerId : providerIds) {
ProfileOptions.ProviderOptions ppo = new ProfileOptions.ProviderOptions();
po.providerOptionsMap.put(providerId, ppo);
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/ScannerConfigProfile.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/ScannerConfigProfile.java
index 015e369677..ea33d5cd55 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/ScannerConfigProfile.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/ScannerConfigProfile.java
@@ -243,7 +243,7 @@ public class ScannerConfigProfile {
private ScannerInfoCollector scannerInfoCollector;
private BuildOutputProvider buildOutputProvider;
- private Map<String, ScannerInfoProvider> scannerInfoProviders = new LinkedHashMap<String, ScannerInfoProvider>();
+ private Map<String, ScannerInfoProvider> scannerInfoProviders = new LinkedHashMap<>();
private Boolean supportsContext;
@@ -296,7 +296,7 @@ public class ScannerConfigProfile {
* @return Returns the list of providerIds
*/
public List<String> getSIProviderIds() {
- return new ArrayList<String>(scannerInfoProviders.keySet());
+ return new ArrayList<>(scannerInfoProviders.keySet());
}
/**
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/ScannerConfigProfileManager.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/ScannerConfigProfileManager.java
index a65cd3f5c7..484f4a5cfc 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/ScannerConfigProfileManager.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig2/ScannerConfigProfileManager.java
@@ -52,7 +52,7 @@ public final class ScannerConfigProfileManager {
* Singleton pattern
*/
private ScannerConfigProfileManager() {
- projectToProfileInstanceMap = new HashMap<IProject, Map<InfoContext, Object>>();
+ projectToProfileInstanceMap = new HashMap<>();
}
private static final ScannerConfigProfileManager instance = new ScannerConfigProfileManager();
@@ -92,7 +92,7 @@ public final class ScannerConfigProfileManager {
synchronized (fLock) {
Map<InfoContext, Object> map = projectToProfileInstanceMap.get(project);
if (map == null && create) {
- map = new HashMap<InfoContext, Object>();
+ map = new HashMap<>();
projectToProfileInstanceMap.put(project, map);
}
return Collections.synchronizedMap(map);
@@ -129,7 +129,7 @@ public final class ScannerConfigProfileManager {
if (profileInstance == null || !profileInstance.getProfile().getId().equals(profileId)) {
profileInstance = new SCProfileInstance(project, context, getSCProfileConfiguration(profileId));
- map.put(context, new SoftReference<SCProfileInstance>(profileInstance));
+ map.put(context, new SoftReference<>(profileInstance));
}
return profileInstance;
}
@@ -158,7 +158,7 @@ public final class ScannerConfigProfileManager {
public List<String> getProfileIds() {
synchronized (fLock) {
if (profileIds == null) {
- profileIds = new ArrayList<String>();
+ profileIds = new ArrayList<>();
IExtensionPoint extension = Platform.getExtensionRegistry().getExtensionPoint(MakeCorePlugin.PLUGIN_ID,
ScannerConfigProfileManager.SI_PROFILE_SIMPLE_ID);
if (extension != null) {
@@ -182,7 +182,7 @@ public final class ScannerConfigProfileManager {
synchronized (fLock) {
if (contextAwareProfileIds == null) {
- contextAwareProfileIds = new ArrayList<String>();
+ contextAwareProfileIds = new ArrayList<>();
List<String> all = getProfileIds();
for (int i = 0; i < all.size(); i++) {

Back to the top