Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Ross2013-10-09 14:58:48 +0000
committerJohn Ross2013-10-21 19:35:33 +0000
commitabc7b7b8a21ad8adb11a37f7c1cd98bb59d33e58 (patch)
treec60ad5e676ffab3fef4c031869bfe1818b10cf48 /bundles/org.eclipse.equinox.metatype
parent9bad48bb69e65d005e81b78b51e76af93fd436d3 (diff)
downloadrt.equinox.bundles-abc7b7b8a21ad8adb11a37f7c1cd98bb59d33e58.tar.gz
rt.equinox.bundles-abc7b7b8a21ad8adb11a37f7c1cd98bb59d33e58.tar.xz
rt.equinox.bundles-abc7b7b8a21ad8adb11a37f7c1cd98bb59d33e58.zip
Bug 418663 - [metatype] Get rid of compile warnings in official build
Update jdt core prefs to org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled. Remove @SuppressWarnings annotations. Parameterize Collections.empty*** methods rather than using Collections.EMPTY_*** fields. Update copyrights. Add API filters for @noimplement warnings.
Diffstat (limited to 'bundles/org.eclipse.equinox.metatype')
-rwxr-xr-xbundles/org.eclipse.equinox.metatype/.settings/.api_filters30
-rw-r--r--bundles/org.eclipse.equinox.metatype/.settings/org.eclipse.jdt.core.prefs43
-rw-r--r--bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/ExtendableHelper.java8
-rw-r--r--bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/LogTracker.java6
-rw-r--r--bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeProviderTracker.java14
5 files changed, 82 insertions, 19 deletions
diff --git a/bundles/org.eclipse.equinox.metatype/.settings/.api_filters b/bundles/org.eclipse.equinox.metatype/.settings/.api_filters
new file mode 100755
index 000000000..bb2157b92
--- /dev/null
+++ b/bundles/org.eclipse.equinox.metatype/.settings/.api_filters
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<component id="org.eclipse.equinox.metatype" version="2">
+ <resource path="src/org/eclipse/equinox/metatype/impl/MetaTypeInformationImpl.java" type="org.eclipse.equinox.metatype.impl.MetaTypeInformationImpl">
+ <filter comment="This is an implementation, not a client, of MetaTypeInformation; therefore, @noimplement does not apply." id="574668824">
+ <message_arguments>
+ <message_argument value="EquinoxMetaTypeInformation"/>
+ <message_argument value="MetaTypeInformationImpl"/>
+ <message_argument value="MetaTypeInformation"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="src/org/eclipse/equinox/metatype/impl/MetaTypeProviderTracker.java" type="org.eclipse.equinox.metatype.impl.MetaTypeProviderTracker">
+ <filter comment="This is an implementation, not a client, of MetaTypeInformation; therefore, @noimplement does not apply." id="574668824">
+ <message_arguments>
+ <message_argument value="EquinoxMetaTypeInformation"/>
+ <message_argument value="MetaTypeProviderTracker"/>
+ <message_argument value="MetaTypeInformation"/>
+ </message_arguments>
+ </filter>
+ </resource>
+ <resource path="src/org/eclipse/equinox/metatype/impl/MetaTypeServiceImpl.java" type="org.eclipse.equinox.metatype.impl.MetaTypeServiceImpl">
+ <filter comment="This is an implementation, not a client, of MetaTypeService; therefore, @noimplement does not apply." id="574668824">
+ <message_arguments>
+ <message_argument value="EquinoxMetaTypeService"/>
+ <message_argument value="MetaTypeServiceImpl"/>
+ <message_argument value="MetaTypeService"/>
+ </message_arguments>
+ </filter>
+ </resource>
+</component>
diff --git a/bundles/org.eclipse.equinox.metatype/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.metatype/.settings/org.eclipse.jdt.core.prefs
index 449cf187f..a0668fa4a 100644
--- a/bundles/org.eclipse.equinox.metatype/.settings/org.eclipse.jdt.core.prefs
+++ b/bundles/org.eclipse.equinox.metatype/.settings/org.eclipse.jdt.core.prefs
@@ -6,6 +6,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.targetPlatform=1.5
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
@@ -18,17 +24,23 @@ org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000
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=enabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=error
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
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=warning
org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
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=warning
@@ -36,7 +48,10 @@ org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
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=enabled
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
@@ -44,31 +59,59 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
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=warning
+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=ignore
+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=warning
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=warning
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
org.eclipse.jdt.core.compiler.problem.unusedImport=error
+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=enabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+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.5
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
diff --git a/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/ExtendableHelper.java b/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/ExtendableHelper.java
index 0bccad9a5..86c449158 100644
--- a/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/ExtendableHelper.java
+++ b/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/ExtendableHelper.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 IBM Corporation and others
+ * Copyright (c) 2011, 2013 IBM Corporation 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
@@ -10,16 +10,14 @@
*******************************************************************************/
package org.eclipse.equinox.metatype.impl;
-import org.eclipse.equinox.metatype.Extendable;
-
import java.util.*;
+import org.eclipse.equinox.metatype.Extendable;
public class ExtendableHelper implements Extendable {
private final Map<String, Map<String, String>> attributes;
- @SuppressWarnings("unchecked")
public ExtendableHelper() {
- this(Collections.EMPTY_MAP);
+ this(Collections.<String, Map<String, String>> emptyMap());
}
public ExtendableHelper(Map<String, Map<String, String>> attributes) {
diff --git a/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/LogTracker.java b/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/LogTracker.java
index 3f4fc71dc..d23b46707 100644
--- a/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/LogTracker.java
+++ b/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/LogTracker.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 1998, 2010 IBM Corporation and others.
+ * Copyright (c) 1998, 2013 IBM Corporation 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
@@ -55,14 +55,10 @@ public class LogTracker extends ServiceTracker<LogService, LogService> implement
log(null, level, message, exception);
}
- // Must suppress warnings here because the log service is not
- @SuppressWarnings("rawtypes")
public void log(ServiceReference reference, int level, String message) {
log(reference, level, message, null);
}
- // Must suppress warnings here because the log service is not
- @SuppressWarnings("rawtypes")
public synchronized void log(ServiceReference reference, int level, String message, Throwable exception) {
ServiceReference<LogService>[] references = getServiceReferences();
diff --git a/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeProviderTracker.java b/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeProviderTracker.java
index 5e4c87524..e01df9d57 100644
--- a/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeProviderTracker.java
+++ b/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeProviderTracker.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2011 IBM Corporation and others.
+ * Copyright (c) 2005, 2013 IBM Corporation 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
@@ -210,14 +210,12 @@ public class MetaTypeProviderTracker implements EquinoxMetaTypeInformation {
return ocd.getIcon(size);
}
- @SuppressWarnings("unchecked")
public Map<String, String> getExtensionAttributes(String schema) {
- return Collections.EMPTY_MAP;
+ return Collections.<String, String> emptyMap();
}
- @SuppressWarnings("unchecked")
public Set<String> getExtensionUris() {
- return Collections.EMPTY_SET;
+ return Collections.<String> emptySet();
}
public EquinoxAttributeDefinition[] getAttributeDefinitions(int filter) {
@@ -263,14 +261,12 @@ public class MetaTypeProviderTracker implements EquinoxMetaTypeInformation {
return ad.getDefaultValue();
}
- @SuppressWarnings("unchecked")
public Map<String, String> getExtensionAttributes(String schema) {
- return Collections.EMPTY_MAP;
+ return Collections.<String, String> emptyMap();
}
- @SuppressWarnings("unchecked")
public Set<String> getExtensionUris() {
- return Collections.EMPTY_SET;
+ return Collections.<String> emptySet();
}
public String getMax() {

Back to the top