Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonah Graham2018-11-20 16:20:42 +0000
committerJonah Graham2018-11-22 21:55:36 +0000
commitcaf2292768deccd885b5b6989b731742e2e5edf4 (patch)
tree711a6088f2e17c7e31ebb51af1eadc1af00768e5 /codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan
parent8844a8f9f22802fedffa3cb2a8a21b041aa64b74 (diff)
downloadorg.eclipse.cdt-caf2292768deccd885b5b6989b731742e2e5edf4.tar.gz
org.eclipse.cdt-caf2292768deccd885b5b6989b731742e2e5edf4.tar.xz
org.eclipse.cdt-caf2292768deccd885b5b6989b731742e2e5edf4.zip
Bug 540373: Cleanup: Remove redundant type arguments
This was done by selecting all projects in Eclipse then Source -> Clean Up... -> choosing: - Remove redundant type arguments and completing the wizard Change-Id: Iaecc7010f097b4b1fabd29ccaa34ccb23a716fbf
Diffstat (limited to 'codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan')
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/CodanProblemMarkerResolutionGenerator.java4
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/actions/OpenProblemPreferences.java2
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CodanPreferencePage.java6
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FieldEditorOverlayPage.java2
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FileScopePreferencePage.java4
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/LaunchModesPropertyPage.java2
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/views/ProblemDetailsExtensions.java4
7 files changed, 12 insertions, 12 deletions
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/CodanProblemMarkerResolutionGenerator.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/CodanProblemMarkerResolutionGenerator.java
index 32939d0c832..03406b67e03 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/CodanProblemMarkerResolutionGenerator.java
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/CodanProblemMarkerResolutionGenerator.java
@@ -115,7 +115,7 @@ public class CodanProblemMarkerResolutionGenerator implements IMarkerResolutionG
return new IMarkerResolution[0];
Collection<ConditionalResolution> candidates = conditionalResolutions.get(id);
- ArrayList<IMarkerResolution> resolutions = new ArrayList<IMarkerResolution>();
+ ArrayList<IMarkerResolution> resolutions = new ArrayList<>();
if (candidates != null) {
candidates.stream().filter(candidate -> candidate.isApplicableFor(marker))
@@ -191,7 +191,7 @@ public class CodanProblemMarkerResolutionGenerator implements IMarkerResolutionG
private static void addResolution(String id, ConditionalResolution res) {
Collection<ConditionalResolution> candidates = conditionalResolutions.get(id);
if (candidates == null) {
- candidates = new ArrayList<ConditionalResolution>();
+ candidates = new ArrayList<>();
conditionalResolutions.put(id, candidates);
}
candidates.add(res);
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/actions/OpenProblemPreferences.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/actions/OpenProblemPreferences.java
index cc92f8cace6..11200aa0e0f 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/actions/OpenProblemPreferences.java
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/actions/OpenProblemPreferences.java
@@ -37,7 +37,7 @@ public class OpenProblemPreferences implements IObjectActionDelegate {
public void run(IAction action) {
if (selection instanceof IStructuredSelection) {
IStructuredSelection ss = (IStructuredSelection) selection;
- ArrayList<IProblem> list = new ArrayList<IProblem>();
+ ArrayList<IProblem> list = new ArrayList<>();
IResource resource = null;
for (Iterator<?> iterator = ss.iterator(); iterator.hasNext();) {
Object el = iterator.next();
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CodanPreferencePage.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CodanPreferencePage.java
index 734f225f27c..baf6e0daed7 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CodanPreferencePage.java
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CodanPreferencePage.java
@@ -107,7 +107,7 @@ public class CodanPreferencePage extends FieldEditorOverlayPage implements IWork
public void selectionChanged(SelectionChangedEvent event) {
if (infoButton != null && event.getSelection() instanceof ITreeSelection) {
ITreeSelection s = (ITreeSelection) event.getSelection();
- ArrayList<IProblem> list = new ArrayList<IProblem>();
+ ArrayList<IProblem> list = new ArrayList<>();
for (Iterator<?> iterator = s.iterator(); iterator.hasNext();) {
Object o = iterator.next();
if (o instanceof IProblem) {
@@ -251,7 +251,7 @@ public class CodanPreferencePage extends FieldEditorOverlayPage implements IWork
}
private static void asynchronouslyUpdateMarkers(final IResource resource) {
- final Set<IFile> filesToUpdate = new HashSet<IFile>();
+ final Set<IFile> filesToUpdate = new HashSet<>();
final IWorkbench workbench = PlatformUI.getWorkbench();
IWorkbenchWindow active = workbench.getActiveWorkbenchWindow();
final IWorkbenchPage page = active.getActivePage();
@@ -307,7 +307,7 @@ public class CodanPreferencePage extends FieldEditorOverlayPage implements IWork
private static void removeMarkersForDisabledProblems(IResource resource, IProgressMonitor monitor) {
CheckersRegistry chegistry = CheckersRegistry.getInstance();
- Set<String> markerTypes = new HashSet<String>();
+ Set<String> markerTypes = new HashSet<>();
for (IChecker checker : chegistry) {
Collection<IProblem> problems = chegistry.getRefProblems(checker);
for (IProblem problem : problems) {
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FieldEditorOverlayPage.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FieldEditorOverlayPage.java
index c48e0d08e42..6a47f9da134 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FieldEditorOverlayPage.java
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FieldEditorOverlayPage.java
@@ -51,7 +51,7 @@ import org.eclipse.ui.preferences.ScopedPreferenceStore;
*/
public abstract class FieldEditorOverlayPage extends FieldEditorPreferencePage implements IWorkbenchPropertyPage {
// Stores all created field editors
- private List<FieldEditor> editors = new ArrayList<FieldEditor>();
+ private List<FieldEditor> editors = new ArrayList<>();
// Stores owning element of properties
private IAdaptable element;
// Additional buttons for property pages
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FileScopePreferencePage.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FileScopePreferencePage.java
index 764e76ec83a..2557abcdeee 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FileScopePreferencePage.java
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FileScopePreferencePage.java
@@ -127,13 +127,13 @@ public class FileScopePreferencePage extends PreferencePage {
private ListDialogField<String> createListContents(FileScopeProblemPreference entryToEdit, String key, String label,
String descriptor, String[] buttonLabels) {
ExclusionPatternAdapter adapter = new ExclusionPatternAdapter();
- ListDialogField<String> patternList = new ListDialogField<String>(adapter, buttonLabels,
+ ListDialogField<String> patternList = new ListDialogField<>(adapter, buttonLabels,
new ExclusionInclusionLabelProvider(descriptor));
patternList.setDialogFieldListener(adapter);
patternList.setLabelText(label);
patternList.enableButton(IDX_EDIT, false);
IPath[] pattern = entryToEdit.getAttribute(key);
- ArrayList<String> elements = new ArrayList<String>(pattern.length);
+ ArrayList<String> elements = new ArrayList<>(pattern.length);
for (int i = 0; i < pattern.length; i++) {
String patternName = pattern[i].toString();
if (patternName.length() > 0)
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/LaunchModesPropertyPage.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/LaunchModesPropertyPage.java
index fd4e23f2f87..4e83a3db70e 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/LaunchModesPropertyPage.java
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/LaunchModesPropertyPage.java
@@ -46,7 +46,7 @@ public class LaunchModesPropertyPage extends FieldEditorPreferencePage {
runInEditor = false;
}
setPreferenceStore(prefStore);
- editors = new ArrayList<FieldEditor>();
+ editors = new ArrayList<>();
}
@Override
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/views/ProblemDetailsExtensions.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/views/ProblemDetailsExtensions.java
index 4f762cf6e61..650462267dd 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/views/ProblemDetailsExtensions.java
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/views/ProblemDetailsExtensions.java
@@ -32,7 +32,7 @@ public class ProblemDetailsExtensions {
public static final String ALL = "*";//$NON-NLS-1$
private static final String EXTENSION_POINT_NAME = "codanProblemDetails"; //$NON-NLS-1$
private static boolean extensionsLoaded;
- private static HashMap<String, Collection<?>> map = new HashMap<String, Collection<?>>();
+ private static HashMap<String, Collection<?>> map = new HashMap<>();
private static synchronized void readExtensions() {
if (extensionsLoaded)
@@ -109,7 +109,7 @@ public class ProblemDetailsExtensions {
public static Collection<AbstractCodanProblemDetailsProvider> getProviders(String id) {
readExtensions();
- Collection<AbstractCodanProblemDetailsProvider> providers = new ArrayList<AbstractCodanProblemDetailsProvider>();
+ Collection<AbstractCodanProblemDetailsProvider> providers = new ArrayList<>();
Collection<?> collection1 = getCollection(id);
Collection<?> collection2 = getCollection(ALL);
providers.addAll(resolveProviders(collection1));

Back to the top