Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxBundlesState.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.core/META-INF/MANIFEST.MF3
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/CachingArtifactRepository.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/BundleDiscoveryStrategy.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/DirectoryParser.java27
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/util/CacheManager.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/Catalog.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/Collector.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/CompoundQueryable.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/QueryUtil.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/.settings/org.eclipse.jdt.core.prefs28
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/DirectorApplicationTest.java1
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/EquinoxExecutableActionTest.java62
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/BundlesTxtTest.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/ControlListViewer.java26
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CatalogViewer.java18
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/IUDetail.java9
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/AbstractPage.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportPage.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/MigrationPage.java15
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIAdapterFactory.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RemediationGroup.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactElement.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositoryElement.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableIUElement.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/CategoryElement.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/InstalledIUElement.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositoryElement.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileElement.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProvElement.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RollbackProfileElement.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/artifact/UpdateSiteArtifactRepository.java9
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/UpdateSiteMetadataRepository.java4
34 files changed, 197 insertions, 98 deletions
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxBundlesState.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxBundlesState.java
index b7a886b6f..fbc204c32 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxBundlesState.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxBundlesState.java
@@ -663,8 +663,9 @@ public class EquinoxBundlesState implements BundlesState {
@SuppressWarnings("rawtypes")
Dictionary[] dics = state.getPlatformProperties();
for (int i = 0; i < dics.length; i++) {
- for (@SuppressWarnings("unchecked")
- Enumeration<String> enumeration = dics[i].keys(); enumeration.hasMoreElements();) {
+ // don't disable this warning because it will cause build-time warning.
+ // see bug 423628 and 423625.
+ for (Enumeration<String> enumeration = dics[i].keys(); enumeration.hasMoreElements();) {
String key = enumeration.nextElement();
String value = (String) dics[i].get(key);
sb.append(" (" + key + "," + value + ")\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java
index 0953cdea9..359b5c47e 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/SimpleArtifactRepository.java
@@ -694,7 +694,8 @@ public class SimpleArtifactRepository extends AbstractArtifactRepository impleme
return mirrors.getMirrorLocation(baseLocation, monitor);
}
- @SuppressWarnings("rawtypes")
+ // don't suppress the warning as it will cause warnings in the official build
+ // see bug 423628. Entire hierarchy should be refactored to use generics.
public Object getAdapter(Class adapter) {
// if we are adapting to file or writable repositories then make sure we have a file location
if (adapter == IFileArtifactRepository.class)
diff --git a/bundles/org.eclipse.equinox.p2.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.core/META-INF/MANIFEST.MF
index c89569f4f..3b34ccf85 100644
--- a/bundles/org.eclipse.equinox.p2.core/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.core/META-INF/MANIFEST.MF
@@ -43,7 +43,8 @@ Export-Package: org.eclipse.equinox.internal.p2.core;x-friends:="org.eclipse.equ
org.eclipse.equinox.p2.updatesite,
org.eclipse.equinox.p2.transport.ecf,
org.eclipse.equinox.p2.discovery.compatibility,
- org.eclipse.equinox.p2.ui.discovery",
+ org.eclipse.equinox.p2.ui.discovery,
+ org.eclipse.equinox.p2.discovery",
org.eclipse.equinox.internal.provisional.p2.core.eventbus;
x-friends:="org.eclipse.equinox.p2.artifact.repository,
org.eclipse.equinox.p2.director,
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/CachingArtifactRepository.java b/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/CachingArtifactRepository.java
index 937f82b2f..d7f4cf9f6 100644
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/CachingArtifactRepository.java
+++ b/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/CachingArtifactRepository.java
@@ -324,7 +324,8 @@ public class CachingArtifactRepository implements IArtifactRepository, IFileArti
return setProperty(key, value, new NullProgressMonitor());
}
- @SuppressWarnings("rawtypes")
+ // don't suppress the warning as it will cause warnings in the official build
+ // see bug 423628. Entire hierarchy should be refactored to use generics.
public Object getAdapter(Class adapter) {
return innerRepo.getAdapter(adapter);
}
diff --git a/bundles/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/BundleDiscoveryStrategy.java b/bundles/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/BundleDiscoveryStrategy.java
index bb4796073..b394ba8b0 100644
--- a/bundles/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/BundleDiscoveryStrategy.java
+++ b/bundles/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/BundleDiscoveryStrategy.java
@@ -28,7 +28,10 @@ public class BundleDiscoveryStrategy extends AbstractDiscoveryStrategy {
// constructor
}
- @SuppressWarnings("unused")
+ /**
+ * @throws CoreException - this exception is not actually thrown by the implementation,
+ * but is required by super contract.
+ */
@Override
public void performDiscovery(IProgressMonitor monitor) throws CoreException {
if (items == null || categories == null) {
diff --git a/bundles/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/DirectoryParser.java b/bundles/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/DirectoryParser.java
index 76a9fe10b..251b721ad 100644
--- a/bundles/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/DirectoryParser.java
+++ b/bundles/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/DirectoryParser.java
@@ -60,34 +60,48 @@ public class DirectoryParser {
return contentHandler.directory;
}
- @SuppressWarnings("unused")
private class DirectoryContentHandler implements ContentHandler {
Directory directory;
+ /**
+ * @throws SAXException - required by contract, not really thrown
+ */
public void characters(char[] ch, int start, int length) throws SAXException {
// ignore
}
/**
- * @throws SAXException
+ * @throws SAXException - required by contract, not really thrown
*/
public void endDocument() throws SAXException {
// ignore
}
+ /**
+ * @throws SAXException - required by contract, not really thrown
+ */
public void endElement(String uri, String localName, String qName) throws SAXException {
// ignore
}
+ /**
+ * @throws SAXException - required by contract, not really thrown
+ */
public void endPrefixMapping(String prefix) throws SAXException {
// ignore
}
+ /**
+ * @throws SAXException - required by contract, not really thrown
+ */
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException {
// ignore
}
+ /**
+ * @throws SAXException - required by contract, not really thrown
+ */
public void processingInstruction(String target, String data) throws SAXException {
// ignore
}
@@ -96,10 +110,16 @@ public class DirectoryParser {
// ignore
}
+ /**
+ * @throws SAXException - required by contract, not really thrown
+ */
public void skippedEntity(String name) throws SAXException {
// ignore
}
+ /**
+ * @throws SAXException - required by contract, not really thrown
+ */
public void startDocument() throws SAXException {
// ignore
}
@@ -126,6 +146,9 @@ public class DirectoryParser {
throw new SAXException(NLS.bind(Messages.DirectoryParser_unexpected_element, localName));
}
+ /**
+ * @throws SAXException - required by contract, not really thrown
+ */
public void startPrefixMapping(String prefix, String uri) throws SAXException {
// ignore
}
diff --git a/bundles/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/util/CacheManager.java b/bundles/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/util/CacheManager.java
index ad5330da5..95d7a25be 100644
--- a/bundles/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/util/CacheManager.java
+++ b/bundles/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/util/CacheManager.java
@@ -28,7 +28,6 @@ import org.eclipse.osgi.util.NLS;
* A class to manage discovery cache files. Creating the cache files will place
* the file in the plugin state location in a cache directory.
*/
-@SuppressWarnings("restriction")
public class CacheManager {
private static final String PREFIX = "discovery"; //$NON-NLS-1$
diff --git a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/Catalog.java b/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/Catalog.java
index e25b43792..5ac314a36 100644
--- a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/Catalog.java
+++ b/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/Catalog.java
@@ -248,6 +248,7 @@ public class Catalog {
/**
* eliminate any connectors whose {@link CatalogItem#getPlatformFilter() platform filters} don't match
*/
+ @SuppressWarnings({"rawtypes", "unchecked"})
private void filterDescriptors() {
for (CatalogItem connector : new ArrayList<CatalogItem>(items)) {
if (connector.getPlatformFilter() != null && connector.getPlatformFilter().trim().length() > 0) {
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/Collector.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/Collector.java
index 05b0826cd..ffa7b3072 100644
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/Collector.java
+++ b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/Collector.java
@@ -164,8 +164,10 @@ public class Collector<T> implements IQueryResult<T> {
*
* @return An unmodifiable collection of the collected objects
*/
- @SuppressWarnings("unchecked")
public Set<T> toUnmodifiableSet() {
- return collected == null ? Collections.EMPTY_SET : Collections.unmodifiableSet(collected);
+ if (collected == null) {
+ return Collections.emptySet();
+ }
+ return Collections.unmodifiableSet(collected);
}
}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/CompoundQueryable.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/CompoundQueryable.java
index 6d1f6a58f..621838be4 100644
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/CompoundQueryable.java
+++ b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/CompoundQueryable.java
@@ -52,8 +52,9 @@ public final class CompoundQueryable<T> extends IndexProvider<T> {
*
* @param queryables The collection of queryables to be combined
*/
- @SuppressWarnings("unchecked")
CompoundQueryable(Collection<? extends IQueryable<T>> queryables) {
+ // don't suppress the warning as it will cause warnings in the official build
+ // see bug 423628. Write this without unchecked conversion.
this(queryables.toArray(new IQueryable[queryables.size()]));
}
diff --git a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/QueryUtil.java b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/QueryUtil.java
index 82123514c..3c68c1635 100644
--- a/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/QueryUtil.java
+++ b/bundles/org.eclipse.equinox.p2.metadata/src/org/eclipse/equinox/p2/query/QueryUtil.java
@@ -54,8 +54,9 @@ public class QueryUtil {
*
* @param queryables The collection of queryables to be combined
*/
- @SuppressWarnings("unchecked")
public static <T> IQueryable<T> compoundQueryable(Collection<? extends IQueryable<T>> queryables) {
+ // don't suppress the warning as it will cause warnings in the official build
+ // see bug 423628. Write this without unchecked conversion.
return new CompoundQueryable<T>(queryables.toArray(new IQueryable[queryables.size()]));
}
diff --git a/bundles/org.eclipse.equinox.p2.tests/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.tests/.settings/org.eclipse.jdt.core.prefs
index f6678b8de..24cdeed50 100644
--- a/bundles/org.eclipse.equinox.p2.tests/.settings/org.eclipse.jdt.core.prefs
+++ b/bundles/org.eclipse.equinox.p2.tests/.settings/org.eclipse.jdt.core.prefs
@@ -8,6 +8,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
@@ -28,6 +34,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=
org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
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
@@ -35,6 +42,7 @@ 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
@@ -45,7 +53,9 @@ org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
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
@@ -55,25 +65,39 @@ 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=warning
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+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=ignore
+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=enabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
+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
@@ -82,15 +106,17 @@ 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=error
+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=error
org.eclipse.jdt.core.compiler.source=1.6
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/DirectorApplicationTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/DirectorApplicationTest.java
index 62f7ea21e..c00ab4795 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/DirectorApplicationTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/director/DirectorApplicationTest.java
@@ -721,7 +721,6 @@ public class DirectorApplicationTest extends AbstractProvisioningTest {
delete(destinationRepo);
}
- @SuppressWarnings("unused")
private final class DummyCertificate extends Certificate {
DummyCertificate(String type) {
super(type);
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/EquinoxExecutableActionTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/EquinoxExecutableActionTest.java
index b01672482..3f42f4fb7 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/EquinoxExecutableActionTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/publisher/actions/EquinoxExecutableActionTest.java
@@ -102,38 +102,36 @@ public class EquinoxExecutableActionTest extends ActionTest {
debug("Completed EquinoxExecutableActionTest " + idBase + " test."); //$NON-NLS-1$ //$NON-NLS-2$
}
- @SuppressWarnings("hiding")
- private void verifyResults(String idBase, String configSpec) {
+ private void verifyResults(String idBase, String confSpec) {
ArrayList iuList = new ArrayList(publisherResult.getIUs(null, IPublisherResult.ROOT));
- verifyExecIU(iuList, idBase, configSpec);
- verifyEclipseIU(iuList, idBase, configSpec);
- verifyCU(iuList, idBase, configSpec);
- if (configSpec.contains("macosx"))
+ verifyExecIU(iuList, idBase, confSpec);
+ verifyEclipseIU(iuList, idBase, confSpec);
+ verifyCU(iuList, idBase, confSpec);
+ if (confSpec.contains("macosx"))
assertTrue(iuList.size() == 4);
else
assertTrue(iuList.size() == 3);
}
- @SuppressWarnings("hiding")
- private void verifyCU(ArrayList iuList, String idBase, String configSpec) {
- String[] config = AbstractPublisherAction.parseConfigSpec(configSpec);
- String ws = config[0];
- String os = config[1];
- String arch = config[2];
+ private void verifyCU(ArrayList iuList, String idBase, String confSpec) {
+ String[] config = AbstractPublisherAction.parseConfigSpec(confSpec);
+ String _ws = config[0];
+ String _os = config[1];
+ String _arch = config[2];
for (int i = 0; i < iuList.size(); i++) {
IInstallableUnit possibleEclipse = (IInstallableUnit) iuList.get(i);
- if (possibleEclipse.getId().equals(flavorArg + idBase + ".executable." + configSpec)) {//$NON-NLS-1$
+ if (possibleEclipse.getId().equals(flavorArg + idBase + ".executable." + confSpec)) {//$NON-NLS-1$
IInstallableUnitFragment fragment = (IInstallableUnitFragment) iuList.get(i);
Collection<IProvidedCapability> providedCapability = fragment.getProvidedCapabilities();
- verifyProvidedCapability(providedCapability, IInstallableUnit.NAMESPACE_IU_ID, flavorArg + idBase + ".executable." + configSpec, version); //$NON-NLS-1$
+ verifyProvidedCapability(providedCapability, IInstallableUnit.NAMESPACE_IU_ID, flavorArg + idBase + ".executable." + confSpec, version); //$NON-NLS-1$
assertTrue(providedCapability.size() == 1);
Collection<IRequirement> requiredCapability = fragment.getHost();
- verifyRequiredCapability(requiredCapability, IInstallableUnit.NAMESPACE_IU_ID, idBase + ".executable." + configSpec, new VersionRange(version, true, version, true)); //$NON-NLS-1$
+ verifyRequiredCapability(requiredCapability, IInstallableUnit.NAMESPACE_IU_ID, idBase + ".executable." + confSpec, new VersionRange(version, true, version, true)); //$NON-NLS-1$
assertTrue(requiredCapability.size() == 1);
- assertTrue(fragment.getFilter().getParameters()[0].toString().indexOf("(osgi.ws=" + ws + ")") != -1);
- assertTrue(fragment.getFilter().getParameters()[0].toString().indexOf("(osgi.os=" + os + ")") != -1);
- assertTrue(fragment.getFilter().getParameters()[0].toString().indexOf("(osgi.arch=" + arch + ")") != -1);
+ assertTrue(fragment.getFilter().getParameters()[0].toString().indexOf("(osgi.ws=" + _ws + ")") != -1);
+ assertTrue(fragment.getFilter().getParameters()[0].toString().indexOf("(osgi.os=" + _os + ")") != -1);
+ assertTrue(fragment.getFilter().getParameters()[0].toString().indexOf("(osgi.arch=" + _arch + ")") != -1);
assertTrue(fragment.getProperty("org.eclipse.equinox.p2.type.fragment").equals("true")); //$NON-NLS-1$ //$NON-NLS-2$
return;//pass
}
@@ -141,14 +139,13 @@ public class EquinoxExecutableActionTest extends ActionTest {
fail();
}
- @SuppressWarnings("hiding")
- private void verifyEclipseIU(ArrayList iuList, String idBase, String configSpec) {
+ private void verifyEclipseIU(ArrayList iuList, String idBase, String confSpec) {
for (int i = 0; i < iuList.size(); i++) {
IInstallableUnit possibleEclipse = (IInstallableUnit) iuList.get(i);
- if (possibleEclipse.getId().equals((idBase + ".executable." + configSpec + "." + EXECUTABLE_NAME))) { //$NON-NLS-1$//$NON-NLS-2$
+ if (possibleEclipse.getId().equals((idBase + ".executable." + confSpec + "." + EXECUTABLE_NAME))) { //$NON-NLS-1$//$NON-NLS-2$
assertTrue(possibleEclipse.getVersion().equals(version));
Collection<IProvidedCapability> providedCapability = possibleEclipse.getProvidedCapabilities();
- verifyProvidedCapability(providedCapability, IInstallableUnit.NAMESPACE_IU_ID, idBase + ".executable." + configSpec + "." + EXECUTABLE_NAME, version); //$NON-NLS-1$ //$NON-NLS-2$
+ verifyProvidedCapability(providedCapability, IInstallableUnit.NAMESPACE_IU_ID, idBase + ".executable." + confSpec + "." + EXECUTABLE_NAME, version); //$NON-NLS-1$ //$NON-NLS-2$
assertTrue(providedCapability.size() == 1);
Collection<IRequirement> req = possibleEclipse.getRequirements();
assertTrue(req.size() == 0);
@@ -158,28 +155,27 @@ public class EquinoxExecutableActionTest extends ActionTest {
fail();
}
- @SuppressWarnings("hiding")
- private void verifyExecIU(ArrayList iuList, String idBase, String configSpec) {
- String[] config = AbstractPublisherAction.parseConfigSpec(configSpec);
- String ws = config[0];
- String os = config[1];
- String arch = config[2];
+ private void verifyExecIU(ArrayList iuList, String idBase, String confSpec) {
+ String[] config = AbstractPublisherAction.parseConfigSpec(confSpec);
+ String _ws = config[0];
+ String _os = config[1];
+ String _arch = config[2];
for (int i = 0; i < iuList.size(); i++) {
IInstallableUnit possibleExec = (IInstallableUnit) iuList.get(i);
- if (possibleExec.getId().equals(idBase + ".executable." + configSpec)) { //$NON-NLS-1$
+ if (possibleExec.getId().equals(idBase + ".executable." + confSpec)) { //$NON-NLS-1$
//keep checking
- assertTrue(possibleExec.getFilter().equals(InstallableUnit.parseFilter("(& (osgi.ws=" + ws + ")(osgi.os=" + os + ")(osgi.arch=" + arch + "))"))); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
+ assertTrue(possibleExec.getFilter().equals(InstallableUnit.parseFilter("(& (osgi.ws=" + _ws + ")(osgi.os=" + _os + ")(osgi.arch=" + _arch + "))"))); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
IArtifactKey eKey = possibleExec.getArtifacts().iterator().next();
assertTrue(eKey.getClassifier().equals("binary")); //$NON-NLS-1$
- assertTrue(eKey.getId().equals(idBase + ".executable." + configSpec)); //$NON-NLS-1$
+ assertTrue(eKey.getId().equals(idBase + ".executable." + confSpec)); //$NON-NLS-1$
assertTrue(eKey.getVersion().equals(version));
Collection<IProvidedCapability> providedCapabilities = possibleExec.getProvidedCapabilities();
- verifyProvidedCapability(providedCapabilities, IInstallableUnit.NAMESPACE_IU_ID, idBase + ".executable." + configSpec, version); //$NON-NLS-1$
+ verifyProvidedCapability(providedCapabilities, IInstallableUnit.NAMESPACE_IU_ID, idBase + ".executable." + confSpec, version); //$NON-NLS-1$
verifyProvidedCapability(providedCapabilities, flavorArg + idBase, idBase + ".executable", version); //$NON-NLS-1$
assertTrue(providedCapabilities.size() == 2);
Collection<IRequirement> requiredCapability = possibleExec.getRequirements();
- verifyRequiredCapability(requiredCapability, IInstallableUnit.NAMESPACE_IU_ID, "org.eclipse.equinox.launcher." + (idBase.equals("mac") || idBase.equals("macCocoa") ? configSpec.substring(0, configSpec.lastIndexOf(".")) : configSpec), VersionRange.emptyRange); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ verifyRequiredCapability(requiredCapability, IInstallableUnit.NAMESPACE_IU_ID, "org.eclipse.equinox.launcher." + (idBase.equals("mac") || idBase.equals("macCocoa") ? confSpec.substring(0, confSpec.lastIndexOf(".")) : confSpec), VersionRange.emptyRange); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
assertTrue(requiredCapability.size() == 1);
try {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/BundlesTxtTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/BundlesTxtTest.java
index 5c4097269..b5a8f4998 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/BundlesTxtTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/simpleconfigurator/BundlesTxtTest.java
@@ -16,8 +16,10 @@ import org.eclipse.equinox.p2.tests.TestData;
import org.osgi.framework.BundleContext;
public class BundlesTxtTest extends AbstractSimpleConfiguratorTest {
- @SuppressWarnings("hiding")
- private static String BUNDLE_JAR_DIRECTORY = "simpleConfiguratorTest/bundlesTxt";
+
+ {
+ BUNDLE_JAR_DIRECTORY = "simpleConfiguratorTest/bundlesTxt";
+ }
private File[] jars = null;
private File bundleInfo = null;
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/ControlListViewer.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/ControlListViewer.java
index 677cb2e73..c68ac0ede 100644
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/ControlListViewer.java
+++ b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/util/ControlListViewer.java
@@ -214,13 +214,13 @@ public abstract class ControlListViewer extends StructuredViewer {
doUpdateContent();
}
- private void updateSize(@SuppressWarnings("hiding") Control control) {
- if (control == null) {
+ private void updateSize(Control c) {
+ if (c == null) {
return;
}
// XXX need a small offset in case the list has a scroll bar
- Point size = control.computeSize(scrolled.getClientArea().width - 20, SWT.DEFAULT, true);
- control.setSize(size);
+ Point size = c.computeSize(scrolled.getClientArea().width - 20, SWT.DEFAULT, true);
+ c.setSize(size);
scrolled.setMinSize(size);
}
@@ -341,9 +341,8 @@ public abstract class ControlListViewer extends StructuredViewer {
}
protected void handleOpen() {
- @SuppressWarnings("hiding")
- Control control = getControl();
- if (control != null && !control.isDisposed()) {
+ Control c = getControl();
+ if (c != null && !c.isDisposed()) {
ISelection selection = getSelection();
fireOpen(new OpenEvent(this, selection));
}
@@ -415,14 +414,17 @@ public abstract class ControlListViewer extends StructuredViewer {
}
}
- @SuppressWarnings({"unchecked", "rawtypes"})
+ @SuppressWarnings({"rawtypes"})
@Override
protected void setSelectionToWidget(List list, boolean reveal) {
if (list != null) {
+ //see bug 423628. This should be suppressed as:
+ //1. it will cause warning at build time.
+ //2. should be possible to fix once swt/jface enables generics for good.
HashSet<Object> elements = new HashSet<Object>(list);
Control[] children = control.getChildren();
- for (Control control : children) {
- ControlListItem child = (ControlListItem) control;
+ for (Control c : children) {
+ ControlListItem child = (ControlListItem) c;
boolean selected = elements.contains(child.getData());
if (selected != child.isSelected()) {
child.setSelected(selected);
@@ -434,8 +436,8 @@ public abstract class ControlListViewer extends StructuredViewer {
}
} else {
Control[] children = control.getChildren();
- for (Control control : children) {
- ControlListItem child = (ControlListItem) control;
+ for (Control c : children) {
+ ControlListItem child = (ControlListItem) c;
if (child.isSelected()) {
child.setSelected(false);
}
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CatalogViewer.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CatalogViewer.java
index b096f8372..b9ad40662 100644
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CatalogViewer.java
+++ b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/wizards/CatalogViewer.java
@@ -325,8 +325,8 @@ public class CatalogViewer extends FilteredViewer {
@Override
protected StructuredViewer doCreateViewer(Composite container) {
- @SuppressWarnings("hiding")
- StructuredViewer viewer = new ControlListViewer(container, SWT.BORDER) {
+
+ StructuredViewer _viewer = new ControlListViewer(container, SWT.BORDER) {
@Override
protected ControlListItem<?> doCreateItem(Composite parent, Object element) {
return doCreateViewerItem(parent, element);
@@ -334,14 +334,14 @@ public class CatalogViewer extends FilteredViewer {
};
contentProvider = doCreateContentProvider();
contentProvider.setHasCategories(isShowCategories());
- viewer.setContentProvider(contentProvider);
- viewer.setSorter(new ViewerSorter() {
+ _viewer.setContentProvider(contentProvider);
+ _viewer.setSorter(new ViewerSorter() {
CatalogCategoryComparator categoryComparator = new CatalogCategoryComparator();
CatalogItemComparator itemComparator = new CatalogItemComparator();
@Override
- public int compare(@SuppressWarnings("hiding") Viewer viewer, Object o1, Object o2) {
+ public int compare(Viewer v, Object o1, Object o2) {
CatalogCategory cat1 = getCategory(o1);
CatalogCategory cat2 = getCategory(o2);
@@ -363,7 +363,7 @@ public class CatalogViewer extends FilteredViewer {
if (cat1 == cat2 && o1 instanceof CatalogItem && o2 instanceof CatalogItem) {
return itemComparator.compare((CatalogItem) o1, (CatalogItem) o2);
}
- return super.compare(viewer, o1, o2);
+ return super.compare(v, o1, o2);
}
return i;
}
@@ -388,15 +388,15 @@ public class CatalogViewer extends FilteredViewer {
});
resources = new DiscoveryResources(container.getDisplay());
- viewer.getControl().addDisposeListener(new DisposeListener() {
+ _viewer.getControl().addDisposeListener(new DisposeListener() {
public void widgetDisposed(DisposeEvent e) {
resources.dispose();
if (catalog != null)
catalog.dispose();
}
});
- viewer.addFilter(new Filter());
- return viewer;
+ _viewer.addFilter(new Filter());
+ return _viewer;
}
protected CatalogContentProvider doCreateContentProvider() {
diff --git a/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/IUDetail.java b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/IUDetail.java
index 18f37352e..d53653568 100644
--- a/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/IUDetail.java
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/IUDetail.java
@@ -15,7 +15,7 @@ import java.util.List;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
-public class IUDetail implements IAdaptable{
+public class IUDetail implements IAdaptable {
private final IInstallableUnit iu;
private final List<URI> referredRepo;
@@ -33,7 +33,10 @@ public class IUDetail implements IAdaptable{
return referredRepo;
}
- public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
+ // don't suppress this warning as it will cause build-time warning
+ // see bug 423628. This should be possible to fix once
+ // the entire hierarchy starts using generics
+ public Object getAdapter(Class adapter) {
if (IInstallableUnit.class.equals(adapter))
return iu;
return null;
@@ -44,7 +47,7 @@ public class IUDetail implements IAdaptable{
if (this == obj)
return true;
if (obj instanceof IUDetail) {
- if (iu.equals(((IUDetail)obj).getIU()))
+ if (iu.equals(((IUDetail) obj).getIU()))
return true;
}
return false;
diff --git a/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/AbstractPage.java b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/AbstractPage.java
index 787afb824..f06dddec1 100644
--- a/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/AbstractPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/AbstractPage.java
@@ -155,13 +155,17 @@ public abstract class AbstractPage extends WizardPage implements Listener {
ITableLabelProvider tableProvider = (ITableLabelProvider) baseLabel;
String e1p = tableProvider.getColumnText(e1, getSortColumn());
String e2p = tableProvider.getColumnText(e2, getSortColumn());
- @SuppressWarnings("unchecked")
+ // don't suppress this warning as it will cause build-time warning
+ // see bug 423628. This should be possible to fix once
+ // SWT/JFace adopt generics
int result = getComparator().compare(e1p, e2p);
// Secondary column sort
if (result == 0) {
e1p = tableProvider.getColumnText(e1, lastSortColumn);
e2p = tableProvider.getColumnText(e2, lastSortColumn);
- @SuppressWarnings("unchecked")
+ // don't suppress this warning as it will cause build-time warning
+ // see bug 423628. This should be possible to fix once
+ // SWT/JFace adopt generics
int result2 = getComparator().compare(e1p, e2p);
return lastAscending ? result2 : (-1) * result2;
}
diff --git a/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportPage.java b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportPage.java
index 5796aafa4..9bc7fe3b1 100644
--- a/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui.importexport/src/org/eclipse/equinox/internal/p2/importexport/internal/wizard/ImportPage.java
@@ -438,7 +438,9 @@ public class ImportPage extends AbstractImportPage implements ISelectableIUsPage
}
if (sub2.isCanceled())
throw new InterruptedException();
- @SuppressWarnings("unchecked")
+ // don't suppress this warning as it will cause build-time warning
+ // see bug 423628. Find a way to change the code to not produce
+ // the warning.
Set<IInstallableUnit> result = new CompoundQueryable<IInstallableUnit>(repos.toArray(new IRepository[repos.size()])).query(QueryUtil.createIUQuery(feature.getIU().getId(), new VersionRange(feature.getIU().getVersion(), true, null, false)), sub2.newChild(100)).toSet();
List<IUDetail> existingFeatures = new ArrayList<IUDetail>(result.size());
for (IInstallableUnit iu : result) {
diff --git a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/MigrationPage.java b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/MigrationPage.java
index 9a8d6f6f6..f065189ba 100644
--- a/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/MigrationPage.java
+++ b/bundles/org.eclipse.equinox.p2.ui.sdk.scheduler/src/org/eclipse/equinox/internal/p2/ui/sdk/scheduler/migration/MigrationPage.java
@@ -167,13 +167,17 @@ public class MigrationPage extends WizardPage implements ISelectableIUsPage, Lis
ITableLabelProvider tableProvider = (ITableLabelProvider) baseLabel;
String e1p = tableProvider.getColumnText(e1, getSortColumn());
String e2p = tableProvider.getColumnText(e2, getSortColumn());
- @SuppressWarnings("unchecked")
+ // don't suppress this warning as it will cause build-time warning
+ // see bug 423628. This should be possible to fix once
+ // SWT/JFace adopts generics
int result = getComparator().compare(e1p, e2p);
// Secondary column sort
if (result == 0) {
e1p = tableProvider.getColumnText(e1, lastSortColumn);
e2p = tableProvider.getColumnText(e2, lastSortColumn);
- @SuppressWarnings("unchecked")
+ // don't suppress this warning as it will cause build-time warning
+ // see bug 423628. This should be possible to fix once
+ // SWT/JFace adopts generics
int result2 = getComparator().compare(e1p, e2p);
return lastAscending ? result2 : (-1) * result2;
}
@@ -787,8 +791,7 @@ public class MigrationPage extends WizardPage implements ISelectableIUsPage, Lis
}
// Look for update of the current selected installation units and replace the old ons with the updated version
- @SuppressWarnings("hiding")
- private Object[] getUpdates(final Object[] checkedElements) {
+ private Object[] getUpdates(final Object[] _checkedElements) {
final Collection<IInstallableUnit> toInstall = new ArrayList<IInstallableUnit>();
@@ -796,10 +799,10 @@ public class MigrationPage extends WizardPage implements ISelectableIUsPage, Lis
getContainer().run(false, true, new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) {
- SubMonitor sub = SubMonitor.convert(monitor, checkedElements.length);
+ SubMonitor sub = SubMonitor.convert(monitor, _checkedElements.length);
ProvisioningContext context = new ProvisioningContext(getProvisioningUI().getSession().getProvisioningAgent());
- for (Object iu : checkedElements) {
+ for (Object iu : _checkedElements) {
if (sub.isCanceled()) {
MigrationPage.this.getUpdatesCanceled = true;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIAdapterFactory.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIAdapterFactory.java
index 6faac08d3..97fd136ba 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIAdapterFactory.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/ProvUIAdapterFactory.java
@@ -27,7 +27,10 @@ import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
public class ProvUIAdapterFactory implements IAdapterFactory {
private static final Class<?>[] CLASSES = new Class[] {IInstallableUnit.class, IProfile.class, IRepository.class, IMetadataRepository.class, IArtifactRepository.class};
- @SuppressWarnings({"rawtypes", "unchecked"})
+ // don't suppress this warning as it will cause build-time warning
+ // see bug 423628. This should be possible to fix once
+ // the entire hierarchy adopts generics
+ @SuppressWarnings("unchecked")
public Object getAdapter(Object adaptableObject, Class adapterType) {
return ProvUI.getAdapter(adaptableObject, adapterType);
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RemediationGroup.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RemediationGroup.java
index 7f41057a3..87ee6df53 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RemediationGroup.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/RemediationGroup.java
@@ -432,7 +432,6 @@ public class RemediationGroup {
private int sortColumn = 0;
private int ascending = 1;
- @SuppressWarnings("unchecked")
@Override
public int compare(Viewer viewer1, Object e1, Object e2) {
if (!(e1 instanceof RemedyIUDetail && e2 instanceof RemedyIUDetail))
@@ -445,6 +444,9 @@ public class RemediationGroup {
ColumnLabelProvider labelProvider = (ColumnLabelProvider) theTreeViewer.getLabelProvider(sortColumn);
String e1p = labelProvider.getText(e1);
String e2p = labelProvider.getText(e2);
+ // don't suppress this warning as it will cause build-time warning
+ // see bug 423628. This should be possible to fix once
+ // SWT/JFace adopts generics
return ascending * getComparator().compare(e1p, e2p);
}
return 0;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactElement.java
index dbc480759..28d5a4c6e 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactElement.java
@@ -46,7 +46,9 @@ public class ArtifactElement extends ProvElement {
return repo.getArtifactDescriptors(key);
}
- @SuppressWarnings("rawtypes")
+ // don't suppress this warning as it will cause build-time warning
+ // see bug 423628. This should be possible to fix once
+ // the entire hierarchy adopts generics
public Object getAdapter(Class adapter) {
if (adapter == IArtifactRepository.class)
return getArtifactRepository();
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositoryElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositoryElement.java
index db6d0502c..75396a3c1 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositoryElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ArtifactRepositoryElement.java
@@ -42,7 +42,9 @@ public class ArtifactRepositoryElement extends RemoteQueriedElement implements I
this.isEnabled = isEnabled;
}
- @SuppressWarnings("rawtypes")
+ // don't suppress this warning as it will cause build-time warning
+ // see bug 423628. This should be possible to fix once
+ // the entire hierarchy adopts generics
public Object getAdapter(Class adapter) {
if (adapter == IArtifactRepository.class)
return getRepository(null);
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableIUElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableIUElement.java
index cbb5aa710..079ae21a9 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableIUElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/AvailableIUElement.java
@@ -98,7 +98,9 @@ public class AvailableIUElement extends QueriedElement implements IIUElement {
return iu.getId();
}
- @SuppressWarnings("rawtypes")
+ // don't suppress this warning as it will cause build-time warning
+ // see bug 423628. This should be possible to fix once
+ // the entire hierarchy adopts generics
public Object getAdapter(Class adapter) {
if (adapter == IInstallableUnit.class)
return iu;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/CategoryElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/CategoryElement.java
index 2fbf9b44f..394a8ddc4 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/CategoryElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/CategoryElement.java
@@ -48,7 +48,9 @@ public class CategoryElement extends RemoteQueriedElement implements IIUElement
return null;
}
- @SuppressWarnings("rawtypes")
+ // don't suppress this warning as it will cause build-time warning
+ // see bug 423628. This should be possible to fix once
+ // the entire hierarchy adopts generics
public Object getAdapter(Class adapter) {
if (adapter == IInstallableUnit.class)
return getIU();
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/InstalledIUElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/InstalledIUElement.java
index 433d527fb..940d84a73 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/InstalledIUElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/InstalledIUElement.java
@@ -48,7 +48,9 @@ public class InstalledIUElement extends QueriedElement implements IIUElement {
return iu.getId();
}
- @SuppressWarnings("rawtypes")
+ // don't suppress this warning as it will cause build-time warning
+ // see bug 423628. This should be possible to fix once
+ // the entire hierarchy adopts generics
public Object getAdapter(Class adapter) {
if (adapter == IInstallableUnit.class)
return iu;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositoryElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositoryElement.java
index 89b7fcccc..146e4b131 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositoryElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/MetadataRepositoryElement.java
@@ -52,7 +52,9 @@ public class MetadataRepositoryElement extends RootElement implements IRepositor
this.isEnabled = isEnabled;
}
- @SuppressWarnings("rawtypes")
+ // don't suppress this warning as it will cause build-time warning
+ // see bug 423628. This should be possible to fix once
+ // the entire hierarchy adopts generics
public Object getAdapter(Class adapter) {
if (adapter == IMetadataRepository.class)
return getQueryable();
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileElement.java
index e206ab6f6..83d6b8cc1 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProfileElement.java
@@ -28,7 +28,9 @@ public class ProfileElement extends RemoteQueriedElement {
this.profileId = profileId;
}
- @SuppressWarnings("rawtypes")
+ // don't suppress this warning as it will cause build-time warning
+ // see bug 423628. This should be possible to fix once
+ // the entire hierarchy adopts generics
public Object getAdapter(Class adapter) {
if (adapter == IProfile.class)
return getQueryable();
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProvElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProvElement.java
index b9c58c663..91dd328a6 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProvElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/ProvElement.java
@@ -36,7 +36,9 @@ public abstract class ProvElement implements IWorkbenchAdapter, IAdaptable {
this.parent = parent;
}
- @SuppressWarnings("rawtypes")
+ // don't suppress this warning as it will cause build-time warning
+ // see bug 423628. This should be possible to fix once
+ // the entire hierarchy adopts generics
public Object getAdapter(Class adapter) {
if (adapter == IWorkbenchAdapter.class)
return this;
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RollbackProfileElement.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RollbackProfileElement.java
index b0bfb804e..efe0ac131 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RollbackProfileElement.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/model/RollbackProfileElement.java
@@ -57,7 +57,9 @@ public class RollbackProfileElement extends RemoteQueriedElement {
return DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.LONG).format(new Date(timestamp));
}
- @SuppressWarnings("rawtypes")
+ // don't suppress this warning as it will cause build-time warning
+ // see bug 423628. This should be possible to fix once
+ // the entire hierarchy adopts generics
public Object getAdapter(Class adapter) {
if (adapter == IProfile.class)
return getProfileSnapshot(new NullProgressMonitor());
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/artifact/UpdateSiteArtifactRepository.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/artifact/UpdateSiteArtifactRepository.java
index 2387b40b2..dc2944be6 100644
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/artifact/UpdateSiteArtifactRepository.java
+++ b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/artifact/UpdateSiteArtifactRepository.java
@@ -13,7 +13,8 @@ package org.eclipse.equinox.internal.p2.updatesite.artifact;
import java.io.OutputStream;
import java.net.URI;
import java.util.Map;
-import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.equinox.p2.core.IProvisioningAgent;
import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
@@ -72,7 +73,7 @@ public class UpdateSiteArtifactRepository implements IArtifactRepository {
public IStatus getArtifacts(IArtifactRequest[] requests, IProgressMonitor monitor) {
return delegate.getArtifacts(requests, monitor);
}
-
+
public OutputStream getOutputStream(IArtifactDescriptor descriptor) throws ProvisionException {
// TODO Auto-generated method stub
return null;
@@ -187,7 +188,9 @@ public class UpdateSiteArtifactRepository implements IArtifactRepository {
throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
}
- @SuppressWarnings("rawtypes")
+ // don't disable this warning because it will cause build-time warning.
+ // see bug 423628.
+ // fix once the entire hierarchy adopts generics.
public Object getAdapter(Class adapter) {
return delegate.getAdapter(adapter);
}
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/UpdateSiteMetadataRepository.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/UpdateSiteMetadataRepository.java
index e28cef7ba..49239eb5c 100644
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/UpdateSiteMetadataRepository.java
+++ b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/metadata/UpdateSiteMetadataRepository.java
@@ -184,7 +184,9 @@ public class UpdateSiteMetadataRepository implements IMetadataRepository {
throw new UnsupportedOperationException("Repository not modifiable: " + location); //$NON-NLS-1$
}
- @SuppressWarnings("rawtypes")
+ // don't disable this warning because it will cause build-time warning.
+ // see bug 423628.
+ // fix once the entire hierarchy adopts generics.
public Object getAdapter(Class adapter) {
return delegate.getAdapter(adapter);
}

Back to the top