Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2015-10-06 06:21:34 -0400
committerJay Arthanareeswaran2015-10-12 02:32:08 -0400
commit4e130c9d5bb20bb7b53d05cfcbc0214ae1f6f2b8 (patch)
treee1a72632a764703138b9ec2818032a8483210b78 /org.eclipse.jdt.apt.ui
parent8715eeccf865a33f86687c2ed1edfa7db42faeec (diff)
downloadeclipse.jdt.core-4e130c9d5bb20bb7b53d05cfcbc0214ae1f6f2b8.tar.gz
eclipse.jdt.core-4e130c9d5bb20bb7b53d05cfcbc0214ae1f6f2b8.tar.xz
eclipse.jdt.core-4e130c9d5bb20bb7b53d05cfcbc0214ae1f6f2b8.zip
Bug 473178 - Remove redundant type arguments (1.7 or highter) from Java
7 code in JDT core This does the change for org.eclipse.jdt.apt.ui Change-Id: I5028bbc960218cc0570e92b7b49ca3f2714aad05 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
Diffstat (limited to 'org.eclipse.jdt.apt.ui')
-rw-r--r--org.eclipse.jdt.apt.ui/.settings/org.eclipse.jdt.core.prefs43
-rw-r--r--org.eclipse.jdt.apt.ui/src/org/eclipse/jdt/apt/ui/internal/preferences/AptConfigurationBlock.java10
-rw-r--r--org.eclipse.jdt.apt.ui/src/org/eclipse/jdt/apt/ui/internal/preferences/BaseConfigurationBlock.java16
-rw-r--r--org.eclipse.jdt.apt.ui/src/org/eclipse/jdt/apt/ui/internal/preferences/FactoryPathConfigurationBlock.java14
-rw-r--r--org.eclipse.jdt.apt.ui/src/org/eclipse/jdt/apt/ui/internal/preferences/ProcessorOptionInputDialog.java4
5 files changed, 65 insertions, 22 deletions
diff --git a/org.eclipse.jdt.apt.ui/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jdt.apt.ui/.settings/org.eclipse.jdt.core.prefs
index 1589433903..57998eab5e 100644
--- a/org.eclipse.jdt.apt.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/org.eclipse.jdt.apt.ui/.settings/org.eclipse.jdt.core.prefs
@@ -7,6 +7,12 @@ org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
org.eclipse.jdt.core.circularClasspath=error
org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
@@ -20,17 +26,23 @@ org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
org.eclipse.jdt.core.compiler.problem.deprecation=warning
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
@@ -41,7 +53,10 @@ org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
@@ -49,19 +64,39 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
org.eclipse.jdt.core.compiler.problem.uninternedIdentityComparison=enabled
@@ -69,13 +104,21 @@ org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=ignore
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=1.7
org.eclipse.jdt.core.incompatibleJDKLevel=ignore
diff --git a/org.eclipse.jdt.apt.ui/src/org/eclipse/jdt/apt/ui/internal/preferences/AptConfigurationBlock.java b/org.eclipse.jdt.apt.ui/src/org/eclipse/jdt/apt/ui/internal/preferences/AptConfigurationBlock.java
index 314f3cff08..cf210f3dce 100644
--- a/org.eclipse.jdt.apt.ui/src/org/eclipse/jdt/apt/ui/internal/preferences/AptConfigurationBlock.java
+++ b/org.eclipse.jdt.apt.ui/src/org/eclipse/jdt/apt/ui/internal/preferences/AptConfigurationBlock.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2013 BEA Systems, Inc. and others.
+ * Copyright (c) 2005, 2015 BEA Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -225,7 +225,7 @@ public class AptConfigurationBlock extends BaseConfigurationBlock {
Messages.AptConfigurationBlock_remove
};
ProcessorOptionsAdapter optionsAdapter = new ProcessorOptionsAdapter();
- fProcessorOptionsField = new ListDialogField<ProcessorOption>(optionsAdapter, buttons, new ProcessorOptionsLabelProvider());
+ fProcessorOptionsField = new ListDialogField<>(optionsAdapter, buttons, new ProcessorOptionsLabelProvider());
fProcessorOptionsField.setDialogFieldListener(optionsAdapter);
fProcessorOptionsField.setRemoveButtonIndex(IDX_REMOVE);
String[] columnHeaders= new String[] {
@@ -426,7 +426,7 @@ public class AptConfigurationBlock extends BaseConfigurationBlock {
* @return true if they did.
*/
private boolean procOptionsChanged() {
- Map<String, String> savedProcOptions = new HashMap<String, String>(fOriginalProcOptions);
+ Map<String, String> savedProcOptions = new HashMap<>(fOriginalProcOptions);
for (ProcessorOption o : getListElements()) {
final String savedVal = savedProcOptions.get(o.key);
if (savedVal != null && savedVal.equals(o.value)) {
@@ -559,7 +559,7 @@ public class AptConfigurationBlock extends BaseConfigurationBlock {
* Save the contents of the options list.
*/
private void saveProcessorOptions(List<ProcessorOption> elements) {
- Map<String, String> map = new LinkedHashMap<String, String>(elements.size());
+ Map<String, String> map = new LinkedHashMap<>(elements.size());
for (ProcessorOption o : elements) {
map.put(o.key, (o.value.length() > 0) ? o.value : null);
}
@@ -570,7 +570,7 @@ public class AptConfigurationBlock extends BaseConfigurationBlock {
* Set the processor options list contents
*/
private void loadProcessorOptions(IJavaProject jproj) {
- List<ProcessorOption> options= new ArrayList<ProcessorOption>();
+ List<ProcessorOption> options= new ArrayList<>();
Map<String, String> parsedOptions = AptConfig.getRawProcessorOptions(jproj);
for (Map.Entry<String, String> entry : parsedOptions.entrySet()) {
ProcessorOption o = new ProcessorOption();
diff --git a/org.eclipse.jdt.apt.ui/src/org/eclipse/jdt/apt/ui/internal/preferences/BaseConfigurationBlock.java b/org.eclipse.jdt.apt.ui/src/org/eclipse/jdt/apt/ui/internal/preferences/BaseConfigurationBlock.java
index 04beaec46a..c57c38bc85 100644
--- a/org.eclipse.jdt.apt.ui/src/org/eclipse/jdt/apt/ui/internal/preferences/BaseConfigurationBlock.java
+++ b/org.eclipse.jdt.apt.ui/src/org/eclipse/jdt/apt/ui/internal/preferences/BaseConfigurationBlock.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2011 BEA Systems, Inc.
+ * Copyright (c) 2005, 2015 BEA Systems, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -235,7 +235,7 @@ public abstract class BaseConfigurationBlock {
if (fProject == null || hasProjectSpecificOptionsNoCache(fProject)) {
fDisabledProjectSettings= null;
} else {
- fDisabledProjectSettings= new IdentityHashMap<Key, String>();
+ fDisabledProjectSettings= new IdentityHashMap<>();
for (int i= 0; i < keys.length; i++) {
Key curr= keys[i];
fDisabledProjectSettings.put(curr, curr.getStoredValue(fLookupOrder, false, fManager));
@@ -244,11 +244,11 @@ public abstract class BaseConfigurationBlock {
settingsUpdated();
- fCheckBoxes= new ArrayList<Button>();
- fComboBoxes= new ArrayList<Combo>();
- fTextBoxes= new ArrayList<Text>(2);
- fLabels= new HashMap<Scrollable, Label>();
- fExpandedComposites= new ArrayList<ExpandableComposite>();
+ fCheckBoxes= new ArrayList<>();
+ fComboBoxes= new ArrayList<>();
+ fTextBoxes= new ArrayList<>(2);
+ fLabels= new HashMap<>();
+ fExpandedComposites= new ArrayList<>();
}
protected Button addCheckBox(Composite parent, String label, Key key, String[] values, int indent) {
@@ -918,7 +918,7 @@ public abstract class BaseConfigurationBlock {
fDisabledProjectSettings= null;
updateControls();
} else {
- fDisabledProjectSettings= new IdentityHashMap<Key, String>();
+ fDisabledProjectSettings= new IdentityHashMap<>();
for (int i= 0; i < fAllKeys.length; i++) {
Key curr= fAllKeys[i];
String oldSetting= curr.getStoredValue(fLookupOrder, false, fManager);
diff --git a/org.eclipse.jdt.apt.ui/src/org/eclipse/jdt/apt/ui/internal/preferences/FactoryPathConfigurationBlock.java b/org.eclipse.jdt.apt.ui/src/org/eclipse/jdt/apt/ui/internal/preferences/FactoryPathConfigurationBlock.java
index 2beb645ad7..2410a9a985 100644
--- a/org.eclipse.jdt.apt.ui/src/org/eclipse/jdt/apt/ui/internal/preferences/FactoryPathConfigurationBlock.java
+++ b/org.eclipse.jdt.apt.ui/src/org/eclipse/jdt/apt/ui/internal/preferences/FactoryPathConfigurationBlock.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2011 BEA Systems, Inc.
+ * Copyright (c) 2005, 2015 BEA Systems, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -164,14 +164,14 @@ public class FactoryPathConfigurationBlock extends BaseConfigurationBlock {
// CONVERSION TO/FROM INDIVIDUAL ELEMENTS
public static Map<FactoryContainer, Attributes> pathMapFromList(List<FactoryPathEntry> list) {
Map<FactoryContainer, FactoryPath.Attributes> map =
- new LinkedHashMap<FactoryContainer, FactoryPath.Attributes>(list.size());
+ new LinkedHashMap<>(list.size());
for (FactoryPathEntry fpe : list) {
map.put(fpe._fc, fpe._attr);
}
return map;
}
public static List<FactoryPathEntry> pathListFromMap(Map<FactoryContainer, Attributes> map) {
- List<FactoryPathEntry> list = new ArrayList<FactoryPathEntry>(map.size());
+ List<FactoryPathEntry> list = new ArrayList<>(map.size());
for (Map.Entry<FactoryContainer, Attributes> entry : map.entrySet()) {
FactoryPathEntry fpe = new FactoryPathEntry(entry.getKey(), entry.getValue());
list.add(fpe);
@@ -225,7 +225,7 @@ public class FactoryPathConfigurationBlock extends BaseConfigurationBlock {
FactoryPathAdapter adapter= new FactoryPathAdapter();
FactoryPathLabelProvider labelProvider = new FactoryPathLabelProvider();
- fFactoryPathList= new CheckedListDialogField<FactoryPathEntry>(adapter, buttonLabels, labelProvider);
+ fFactoryPathList= new CheckedListDialogField<>(adapter, buttonLabels, labelProvider);
fFactoryPathList.setDialogFieldListener(adapter);
fFactoryPathList.setLabelText(Messages.FactoryPathConfigurationBlock_pluginsAndJars);
fFactoryPathList.setUpButtonIndex(IDX_UP);
@@ -558,7 +558,7 @@ public class FactoryPathConfigurationBlock extends BaseConfigurationBlock {
if (results == null) {
return null;
}
- ArrayList<FactoryPathEntry> res= new ArrayList<FactoryPathEntry>();
+ ArrayList<FactoryPathEntry> res= new ArrayList<>();
for (int i= 0; i < results.length; i++) {
IResource resource= root.findMember(results[i]);
if (resource instanceof IFile) {
@@ -603,7 +603,7 @@ public class FactoryPathConfigurationBlock extends BaseConfigurationBlock {
if (selected == null) {
return null;
}
- ArrayList<FactoryPathEntry> res= new ArrayList<FactoryPathEntry>();
+ ArrayList<FactoryPathEntry> res= new ArrayList<>();
for (int i= 0; i < selected.length; i++) {
FactoryContainer fc = FactoryPathUtil.newExtJarFactoryContainer(selected[i].toFile());
// assume defaults of enabled=true, runInAptMode=false
@@ -639,7 +639,7 @@ public class FactoryPathConfigurationBlock extends BaseConfigurationBlock {
if (selected == null) {
return null;
}
- ArrayList<FactoryPathEntry> res= new ArrayList<FactoryPathEntry>();
+ ArrayList<FactoryPathEntry> res= new ArrayList<>();
for (int i= 0; i < selected.length; i++) {
FactoryContainer fc= FactoryPathUtil.newVarJarFactoryContainer(selected[i]);
// assume defaults of enabled=true, runInAptMode=false
diff --git a/org.eclipse.jdt.apt.ui/src/org/eclipse/jdt/apt/ui/internal/preferences/ProcessorOptionInputDialog.java b/org.eclipse.jdt.apt.ui/src/org/eclipse/jdt/apt/ui/internal/preferences/ProcessorOptionInputDialog.java
index 5ce4f60b34..68b6265196 100644
--- a/org.eclipse.jdt.apt.ui/src/org/eclipse/jdt/apt/ui/internal/preferences/ProcessorOptionInputDialog.java
+++ b/org.eclipse.jdt.apt.ui/src/org/eclipse/jdt/apt/ui/internal/preferences/ProcessorOptionInputDialog.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2007 BEA Systems, Inc.
+ * Copyright (c) 2005, 2015 BEA Systems, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -49,7 +49,7 @@ public class ProcessorOptionInputDialog extends StatusDialog {
public ProcessorOptionInputDialog(Shell parent, ProcessorOption option, List<ProcessorOption> existingEntries) {
super(parent);
- fExistingNames= new ArrayList<String>(existingEntries.size());
+ fExistingNames= new ArrayList<>(existingEntries.size());
for (ProcessorOption o : existingEntries) {
if (!o.equals(option)) {
fExistingNames.add(o.key);

Back to the top