Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Ross2013-10-11 18:55:07 +0000
committerJohn Ross2013-10-23 12:43:42 +0000
commit7554a9da2858a672fff996bd62e6d45223fab438 (patch)
tree3746e62ab6d53a61d1e114562f2dc123d54050c0 /bundles/org.eclipse.osgi
parent991b5bda78bf294034a20b859b421a76ff616758 (diff)
downloadrt.equinox.framework-7554a9da2858a672fff996bd62e6d45223fab438.tar.gz
rt.equinox.framework-7554a9da2858a672fff996bd62e6d45223fab438.tar.xz
rt.equinox.framework-7554a9da2858a672fff996bd62e6d45223fab438.zip
Bug 418663 - [osgi] 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. Fix synthetic accessor method warnings. Fix hiding field warnings. Fix non-externalized string literal warnings. Suppress wanrings in pom for external source. Update copyrights. Remove J2SE-1.5 as a BREE. Remove the associated workaround from the pom. This is no longer necessary now that the org.eclipse.equinox.weaving.hook system bundle fragment was moved up to JavaSE-1.6 as part of the same bug. Set org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled to prevent workspace warnings due to having to remove "unnecessary" @SupressWarnings annotations because of the "unused' warning suppression in the pom. Note that the "unused" warning suppression in the pom leaves a workspace warning in ClasspathEntry. The @SuppressWarnings annotation had to be removed but we do not wish to ignore warnings for unused private members.
Diffstat (limited to 'bundles/org.eclipse.osgi')
-rw-r--r--bundles/org.eclipse.osgi/.classpath1
-rw-r--r--bundles/org.eclipse.osgi/.settings/org.eclipse.jdt.core.prefs23
-rw-r--r--bundles/org.eclipse.osgi/META-INF/MANIFEST.MF2
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleDatabase.java6
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleResolver.java1
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/BundleContextImpl.java3
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/OSGiFrameworkHooks.java9
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/legacy/PackageAdminImpl.java2
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/ModuleClassLoader.java1
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/classpath/ClasspathEntry.java1
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/classpath/ClasspathManager.java3
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/sources/NullPackageSource.java5
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogReaderServiceImpl.java3
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ServiceRegistry.java6
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ShrinkableCollection.java5
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignedStorageHook.java1
-rw-r--r--bundles/org.eclipse.osgi/pom.xml9
17 files changed, 45 insertions, 36 deletions
diff --git a/bundles/org.eclipse.osgi/.classpath b/bundles/org.eclipse.osgi/.classpath
index c49c64ff3..c0ae52c7f 100644
--- a/bundles/org.eclipse.osgi/.classpath
+++ b/bundles/org.eclipse.osgi/.classpath
@@ -5,6 +5,5 @@
<classpathentry kind="src" path="osgi/src"/>
<classpathentry kind="src" path="supplement/src"/>
<classpathentry kind="src" path="container/src"/>
- <classpathentry kind="lib" path="osgi/osgi.annotation.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/bundles/org.eclipse.osgi/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.osgi/.settings/org.eclipse.jdt.core.prefs
index df8c0b940..b5002d852 100644
--- a/bundles/org.eclipse.osgi/.settings/org.eclipse.jdt.core.prefs
+++ b/bundles/org.eclipse.osgi/.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.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
@@ -26,6 +32,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=
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=enabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
@@ -44,7 +51,9 @@ org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
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
@@ -61,13 +70,20 @@ org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignor
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
@@ -75,10 +91,12 @@ 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=enabled
+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
@@ -87,7 +105,7 @@ 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.unusedDeclaredThrownExceptionWhenOverriding=disabled
org.eclipse.jdt.core.compiler.problem.unusedImport=error
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
@@ -97,6 +115,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
org.eclipse.jdt.core.compiler.source=1.6
diff --git a/bundles/org.eclipse.osgi/META-INF/MANIFEST.MF b/bundles/org.eclipse.osgi/META-INF/MANIFEST.MF
index d09acdfbf..291f731b1 100644
--- a/bundles/org.eclipse.osgi/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.osgi/META-INF/MANIFEST.MF
@@ -82,5 +82,5 @@ Bundle-DocUrl: http://www.eclipse.org
Eclipse-ExtensibleAPI: true
Eclipse-SystemBundle: true
Main-Class: org.eclipse.core.runtime.adaptor.EclipseStarter
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6, J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Eclipse-BundleShape: jar
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleDatabase.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleDatabase.java
index a56cb9792..5b371ed65 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleDatabase.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleDatabase.java
@@ -64,7 +64,7 @@ public class ModuleDatabase {
/**
* The adaptor for this database
*/
- private final ModuleContainerAdaptor adaptor;
+ final ModuleContainerAdaptor adaptor;
/**
* A map of modules by location.
@@ -79,7 +79,7 @@ public class ModuleDatabase {
/**
* A map of revision wiring objects.
*/
- private final Map<ModuleRevision, ModuleWiring> wirings;
+ final Map<ModuleRevision, ModuleWiring> wirings;
/**
* Holds the next id to be assigned to a module when it is installed
@@ -102,7 +102,7 @@ public class ModuleDatabase {
/**
* A map of module settings keyed by module id.
*/
- private final Map<Long, EnumSet<Settings>> moduleSettings;
+ final Map<Long, EnumSet<Settings>> moduleSettings;
/**
* The initial module start level.
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleResolver.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleResolver.java
index f961d400b..de9cc6929 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleResolver.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/ModuleResolver.java
@@ -349,7 +349,6 @@ final class ModuleResolver {
listIterator.previous();
}
- @SuppressWarnings("unchecked")
private static ModuleWiring createWiringDelta(ModuleRevision revision, ModuleWiring existingWiring, Map<ModuleCapability, List<ModuleWire>> providedWireMap, List<ModuleWire> requiredWires) {
// No null checks are done here on the wires since this is a copy.
// Create a ModuleWiring that only contains the new ordered list of provided wires
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/BundleContextImpl.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/BundleContextImpl.java
index 8762f5986..27e5dfd99 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/BundleContextImpl.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/BundleContextImpl.java
@@ -1007,8 +1007,7 @@ public class BundleContextImpl implements BundleContext, EventDispatcher<Object,
@SuppressWarnings("unchecked")
ServiceReference<S>[] refs = (ServiceReference<S>[]) getServiceReferences(clazz.getName(), filter);
if (refs == null) {
- @SuppressWarnings("unchecked")
- Collection<ServiceReference<S>> empty = Collections.EMPTY_LIST;
+ Collection<ServiceReference<S>> empty = Collections.<ServiceReference<S>> emptyList();
return empty;
}
List<ServiceReference<S>> result = new ArrayList<ServiceReference<S>>(refs.length);
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/OSGiFrameworkHooks.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/OSGiFrameworkHooks.java
index aac21f979..c0b7511f4 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/OSGiFrameworkHooks.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/OSGiFrameworkHooks.java
@@ -189,8 +189,7 @@ class OSGiFrameworkHooks {
BundleContextImpl context = (BundleContextImpl) EquinoxContainer.secureAction.getContext(systemModule.getBundle());
ServiceReferenceImpl<ResolverHookFactory>[] refs = getHookReferences(registry, context);
- @SuppressWarnings("unchecked")
- List<HookReference> hookRefs = refs == null ? Collections.EMPTY_LIST : new ArrayList<CoreResolverHookFactory.HookReference>(refs.length);
+ List<HookReference> hookRefs = refs == null ? Collections.<CoreResolverHookFactory.HookReference> emptyList() : new ArrayList<CoreResolverHookFactory.HookReference>(refs.length);
if (refs != null) {
for (ServiceReferenceImpl<ResolverHookFactory> hookRef : refs) {
ResolverHookFactory factory = context.getService(hookRef);
@@ -218,7 +217,7 @@ class OSGiFrameworkHooks {
private final List<HookReference> hooks;
private final Module systemModule;
- private volatile ResolutionReport report;
+ private volatile ResolutionReport resolutionReport;
CoreResolverHook(List<HookReference> hooks, Module systemModule) {
this.hooks = hooks;
@@ -325,7 +324,7 @@ class OSGiFrameworkHooks {
} else {
try {
if (hookRef.hook instanceof ResolutionReport.Listener)
- ((ResolutionReport.Listener) hookRef.hook).handleResolutionReport(report);
+ ((ResolutionReport.Listener) hookRef.hook).handleResolutionReport(resolutionReport);
hookRef.hook.end();
} catch (Throwable t) {
// Must continue on to the next hook.end method
@@ -351,7 +350,7 @@ class OSGiFrameworkHooks {
@Override
public void handleResolutionReport(ResolutionReport report) {
- this.report = report;
+ resolutionReport = report;
}
}
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/legacy/PackageAdminImpl.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/legacy/PackageAdminImpl.java
index 92917fe2f..1547c69cb 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/legacy/PackageAdminImpl.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/legacy/PackageAdminImpl.java
@@ -251,7 +251,7 @@ public class PackageAdminImpl implements PackageAdmin {
return null;
}
- public Bundle getBundle(@SuppressWarnings("rawtypes") final Class clazz) {
+ public Bundle getBundle(final Class clazz) {
if (System.getSecurityManager() == null)
return getBundlePriv(clazz);
return AccessController.doPrivileged(new GetBundleAction(this, clazz));
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/ModuleClassLoader.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/ModuleClassLoader.java
index 1a025a285..606682436 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/ModuleClassLoader.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/ModuleClassLoader.java
@@ -194,7 +194,6 @@ public class ModuleClassLoader extends ClassLoader implements BundleReference {
return result;
}
- @SuppressWarnings("unused")
@Override
protected Enumeration<URL> findResources(String name) throws IOException {
return findLocalResources(name);
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/classpath/ClasspathEntry.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/classpath/ClasspathEntry.java
index 2b6cc739b..dae72464f 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/classpath/ClasspathEntry.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/classpath/ClasspathEntry.java
@@ -45,7 +45,6 @@ public class ClasspathEntry {
private KeyedHashSet userObjects = null;
// TODO Note that PDE has internal dependency on this field type/name (bug 267238)
- @SuppressWarnings("unused")
private final PDEData data;
/**
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/classpath/ClasspathManager.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/classpath/ClasspathManager.java
index 76eae1958..d70c27fe5 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/classpath/ClasspathManager.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/classpath/ClasspathManager.java
@@ -855,8 +855,7 @@ public class ClasspathManager {
for (FragmentClasspath fragmentClasspath : currentFragments)
generations.add(fragmentClasspath.getGeneration());
- @SuppressWarnings("unchecked")
- List<URL> result = Collections.EMPTY_LIST;
+ List<URL> result = Collections.<URL> emptyList();
// now search over all the bundle files
Enumeration<URL> eURLs = Storage.findEntries(generations, path, filePattern, options);
if (eURLs == null)
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/sources/NullPackageSource.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/sources/NullPackageSource.java
index a1d31415e..77307b5ac 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/sources/NullPackageSource.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/sources/NullPackageSource.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2012 IBM Corporation and others.
+ * Copyright (c) 2003, 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
@@ -62,9 +62,8 @@ public class NullPackageSource extends PackageSource {
return result;
}
- @SuppressWarnings("unchecked")
@Override
public List<String> listResources(String path, String filePattern) {
- return Collections.EMPTY_LIST;
+ return Collections.<String> emptyList();
}
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogReaderServiceImpl.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogReaderServiceImpl.java
index 145960316..868a31603 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogReaderServiceImpl.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/log/ExtendedLogReaderServiceImpl.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2012 Cognos Incorporated, IBM Corporation and others
+ * Copyright (c) 2006, 2013 Cognos Incorporated, 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
@@ -37,7 +37,6 @@ public class ExtendedLogReaderServiceImpl implements ExtendedLogReaderService {
addLogListener(listener, ExtendedLogReaderServiceFactory.NULL_LOGGER_FILTER);
}
- @SuppressWarnings("rawtypes")
public Enumeration getLog() {
checkShutdown();
return factory.getLog();
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ServiceRegistry.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ServiceRegistry.java
index 2b2472298..edcdf4e7a 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ServiceRegistry.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ServiceRegistry.java
@@ -1001,8 +1001,7 @@ public class ServiceRegistry {
}
if ((result == null) || result.isEmpty()) {
- @SuppressWarnings("unchecked")
- List<ServiceRegistrationImpl<?>> empty = Collections.EMPTY_LIST;
+ List<ServiceRegistrationImpl<?>> empty = Collections.<ServiceRegistrationImpl<?>> emptyList();
return empty;
}
@@ -1039,8 +1038,7 @@ public class ServiceRegistry {
List<ServiceRegistrationImpl<?>> result = publishedServicesByContext.get(context);
if ((result == null) || result.isEmpty()) {
- @SuppressWarnings("unchecked")
- List<ServiceRegistrationImpl<?>> empty = Collections.EMPTY_LIST;
+ List<ServiceRegistrationImpl<?>> empty = Collections.<ServiceRegistrationImpl<?>> emptyList();
return empty;
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ShrinkableCollection.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ShrinkableCollection.java
index 5e693f56e..7a093f84d 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ShrinkableCollection.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/serviceregistry/ShrinkableCollection.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2012 IBM Corporation and others.
+ * Copyright (c) 2008, 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
@@ -37,8 +37,7 @@ public class ShrinkableCollection<E> implements Collection<E> {
if (c == null) {
throw new NullPointerException();
}
- @SuppressWarnings("unchecked")
- List<Collection<? extends E>> empty = Collections.EMPTY_LIST;
+ List<Collection<? extends E>> empty = Collections.<Collection<? extends E>> emptyList();
list = empty;
collection = c;
}
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignedStorageHook.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignedStorageHook.java
index a30cf63a7..15243f33a 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignedStorageHook.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/signedcontent/SignedStorageHook.java
@@ -46,7 +46,6 @@ public class SignedStorageHook extends StorageHookFactory<List<SignerInfo>, List
super(generation, SignedStorageHook.class);
}
- @SuppressWarnings("unused")
@Override
public void initialize(Dictionary<String, String> manifest) throws BundleException {
// do nothing
diff --git a/bundles/org.eclipse.osgi/pom.xml b/bundles/org.eclipse.osgi/pom.xml
index 4f05adfc7..4383930d9 100644
--- a/bundles/org.eclipse.osgi/pom.xml
+++ b/bundles/org.eclipse.osgi/pom.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2012 Eclipse Foundation.
+ Copyright (c) 2012, 2013 Eclipse Foundation.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Distribution License v1.0
which accompanies this distribution, and is available at
@@ -26,9 +26,12 @@
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
- <artifactId>target-platform-configuration</artifactId>
+ <artifactId>tycho-compiler-plugin</artifactId>
+ <version>${tycho.version}</version>
<configuration>
- <executionEnvironment>JavaSE-1.6</executionEnvironment>
+ <compilerArgs>
+ <arg>-warn:-raw,unchecked,hiding,unused</arg>
+ </compilerArgs>
</configuration>
</plugin>
</plugins>

Back to the top