diff options
author | Alexander Kurtakov | 2019-03-15 14:15:48 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2019-03-16 09:12:23 +0000 |
commit | 0195c97ec53875f5d39ed0903feccefe5b1ac3b4 (patch) | |
tree | 5793d142c5c0adcde5e5a82f5aace321e760786b /bundles/org.eclipse.equinox.p2.repository | |
parent | e13c71f70b73d9ee5122d1d13267e4a4189c3fc6 (diff) | |
download | rt.equinox.p2-0195c97ec53875f5d39ed0903feccefe5b1ac3b4.tar.gz rt.equinox.p2-0195c97ec53875f5d39ed0903feccefe5b1ac3b4.tar.xz rt.equinox.p2-0195c97ec53875f5d39ed0903feccefe5b1ac3b4.zip |
Add missing Override/Deprecated annotations to p2.repository bundle.
Change-Id: Iec7809dcb1596a843bbc5c8a3b82201b4f15f985
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.repository')
19 files changed, 147 insertions, 110 deletions
diff --git a/bundles/org.eclipse.equinox.p2.repository/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.repository/.settings/org.eclipse.jdt.core.prefs index b3a3226c7..68e4ca0b2 100644 --- a/bundles/org.eclipse.equinox.p2.repository/.settings/org.eclipse.jdt.core.prefs +++ b/bundles/org.eclipse.equinox.p2.repository/.settings/org.eclipse.jdt.core.prefs @@ -9,10 +9,14 @@ 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.nonnull.secondary= org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullable.secondary= org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve org.eclipse.jdt.core.compiler.compliance=1.8 @@ -21,6 +25,7 @@ org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.doc.comment.support=enabled org.eclipse.jdt.core.compiler.maxProblemPerUnit=1000 +org.eclipse.jdt.core.compiler.problem.APILeak=warning org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.autoboxing=ignore @@ -49,7 +54,7 @@ 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.missingDeprecatedAnnotation=warning org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore @@ -58,7 +63,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public 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.missingOverrideAnnotation=warning org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore @@ -66,12 +71,14 @@ 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.nonnullTypeVariableFromLegacyInvocation=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.pessimisticNullAnalysisForFreeTypeVariables=warning org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore @@ -88,19 +95,25 @@ 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.terminalDeprecation=warning org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled 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.unlikelyCollectionMethodArgumentType=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled +org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info 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.unstableAutoModuleName=warning 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.unusedExceptionParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedImport=error org.eclipse.jdt.core.compiler.problem.unusedLabel=warning org.eclipse.jdt.core.compiler.problem.unusedLocal=warning @@ -113,6 +126,7 @@ 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.release=disabled org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 diff --git a/bundles/org.eclipse.equinox.p2.repository/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.repository/META-INF/MANIFEST.MF index 02e566e22..6ab61f3a0 100644 --- a/bundles/org.eclipse.equinox.p2.repository/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.equinox.p2.repository/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.equinox.p2.repository;singleton:=true -Bundle-Version: 2.4.300.qualifier +Bundle-Version: 2.4.400.qualifier Bundle-Activator: org.eclipse.equinox.internal.p2.repository.Activator Bundle-Vendor: %providerName Bundle-Localization: plugin diff --git a/bundles/org.eclipse.equinox.p2.repository/pom.xml b/bundles/org.eclipse.equinox.p2.repository/pom.xml index 37ebef379..f3a74fd7c 100644 --- a/bundles/org.eclipse.equinox.p2.repository/pom.xml +++ b/bundles/org.eclipse.equinox.p2.repository/pom.xml @@ -9,6 +9,6 @@ </parent> <groupId>org.eclipse.equinox</groupId> <artifactId>org.eclipse.equinox.p2.repository</artifactId> - <version>2.4.300-SNAPSHOT</version> + <version>2.4.400-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> </project> diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeParser.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeParser.java index 09eb9a3ab..9450a5d52 100644 --- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeParser.java +++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/CompositeParser.java @@ -50,6 +50,7 @@ public class CompositeParser extends XMLParser implements XMLConstants { return children.toArray(new URI[children.size()]); } + @Override public void startElement(String name, Attributes attributes) { if (name.equals(CHILD_ELEMENT)) { new ChildHandler(this, attributes, children); @@ -78,10 +79,12 @@ public class CompositeParser extends XMLParser implements XMLConstants { } + @Override public void startElement(String name, Attributes attributes) { checkCancel(); } + @Override protected void finished() { if (currentRepo != null) repos.add(currentRepo); @@ -94,6 +97,7 @@ public class CompositeParser extends XMLParser implements XMLConstants { super(rootName, rootHandler); } + @Override public void processingInstruction(String target, String data) throws SAXException { if (repositoryType.equals(target)) { Version repositoryVersion = extractPIVersion(target, data); @@ -124,11 +128,13 @@ public class CompositeParser extends XMLParser implements XMLConstants { return state; } + @Override protected void handleRootAttributes(Attributes attributes) { attrValues = parseAttributes(attributes, required, optional); attrValues[2] = checkVersion(REPOSITORY_ELEMENT, VERSION_ATTRIBUTE, attrValues[2]).toString(); } + @Override public void startElement(String name, Attributes attributes) { if (PROPERTIES_ELEMENT.equals(name)) { if (propertiesHandler == null) { @@ -150,6 +156,7 @@ public class CompositeParser extends XMLParser implements XMLConstants { /* * If we parsed valid XML then fill in our repository state object with the parsed data. */ + @Override protected void finished() { if (isValidXML()) { state = new CompositeRepositoryState(); @@ -208,10 +215,12 @@ public class CompositeParser extends XMLParser implements XMLConstants { } //TODO what? + @Override protected Object getRootObject() { return null; } + @Override protected String getErrorMessage() { return Messages.io_parseError; } diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLParser.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLParser.java index b5945a689..b3898b36e 100644 --- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLParser.java +++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLParser.java @@ -124,6 +124,7 @@ public abstract class XMLParser extends DefaultHandler implements XMLConstants { * * @see org.xml.sax.ContentHandler#setDocumentLocator */ + @Override public void setDocumentLocator(Locator docLocator) { locator = docLocator; } @@ -165,10 +166,12 @@ public abstract class XMLParser extends DefaultHandler implements XMLConstants { * * @see org.xml.sax.ContentHandler#setDocumentLocator */ + @Override public void setDocumentLocator(Locator docLocator) { locator = docLocator; } + @Override public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { finishCharacters(); String name = makeSimpleName(localName, qName); @@ -183,6 +186,7 @@ public abstract class XMLParser extends DefaultHandler implements XMLConstants { new IgnoringHandler(this); } + @Override public void endElement(String namespaceURI, String localName, String qName) { // TODO: throw a bad state error if makeSimpleName(localName, qName) != elementHandled finishCharacters(); @@ -205,6 +209,7 @@ public abstract class XMLParser extends DefaultHandler implements XMLConstants { * * @see org.xml.sax.ContentHandler#characters */ + @Override public void characters(char[] chars, int start, int length) { if (this.characters == null) { this.characters = new StringBuffer(); @@ -366,6 +371,7 @@ public abstract class XMLParser extends DefaultHandler implements XMLConstants { this.rootHandler = rootHandler; } + @Override public void startElement(String name, Attributes attributes) { if (name.equals(elementHandled)) { rootHandler.initialize(this, name, attributes); @@ -413,6 +419,7 @@ public abstract class XMLParser extends DefaultHandler implements XMLConstants { return properties; } + @Override public void startElement(String name, Attributes attributes) { if (name.equals(PROPERTY_ELEMENT)) { new PropertyHandler(this, attributes, properties); @@ -436,6 +443,7 @@ public abstract class XMLParser extends DefaultHandler implements XMLConstants { } } + @Override public void startElement(String name, Attributes attributes) { invalidElement(name, attributes); } @@ -476,10 +484,12 @@ public abstract class XMLParser extends DefaultHandler implements XMLConstants { return (text != null ? text : ""); //$NON-NLS-1$ } + @Override public void startElement(String name, Attributes attributes) { invalidElement(name, attributes); } + @Override protected void processCharacters(String data) { this.text = data == null ? null : data.intern(); } @@ -496,6 +506,7 @@ public abstract class XMLParser extends DefaultHandler implements XMLConstants { this.elementHandled = "IgnoringAll"; //$NON-NLS-1$ } + @Override public void startElement(String name, Attributes attributes) { noSubElements(name, attributes); } @@ -522,10 +533,12 @@ public abstract class XMLParser extends DefaultHandler implements XMLConstants { return (valueIndex >= 0 ? tokens[valueIndex] : ""); //$NON-NLS-1$ } + @Override public void error(SAXParseException ex) { addError(IStatus.WARNING, ex.getMessage(), ex); } + @Override public void fatalError(SAXParseException ex) { addError(IStatus.ERROR, ex.getMessage(), ex); } diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLWriter.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLWriter.java index 624a142a1..849512d39 100644 --- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLWriter.java +++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/persistence/XMLWriter.java @@ -43,6 +43,7 @@ public class XMLWriter implements XMLConstants { return new ProcessingInstruction(target, new String[] {PI_VERSION_ATTRIBUTE}, new String[] {version.toString()}); } + @Override public String toString() { StringBuffer sb = new StringBuffer("<?"); //$NON-NLS-1$ sb.append(this.target).append(' '); diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Activator.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Activator.java index 5b6cb7efa..b0193f35d 100644 --- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Activator.java +++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/Activator.java @@ -30,6 +30,7 @@ public class Activator implements BundleActivator { private static BundleContext context; + @Override public void start(BundleContext aContext) throws Exception { Activator.context = aContext; @@ -37,6 +38,7 @@ public class Activator implements BundleActivator { Class.forName("org.eclipse.core.runtime.IExtensionRegistry"); //$NON-NLS-1$ } + @Override public void stop(BundleContext aContext) throws Exception { Activator.context = aContext; } diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManager.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManager.java index 463e69f66..5cf7b0689 100644 --- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManager.java +++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManager.java @@ -17,7 +17,6 @@ package org.eclipse.equinox.internal.p2.repository; import java.io.*; import java.net.*; -import java.util.EventObject; import java.util.HashSet; import org.eclipse.core.runtime.*; import org.eclipse.equinox.internal.p2.core.helpers.LogHelper; @@ -59,11 +58,13 @@ public class CacheManager { super(stream); } + @Override public IStatus getStatus() { return status; } + @Override public void setStatus(IStatus aStatus) { status = aStatus; } @@ -339,13 +340,11 @@ public class CacheManager { */ private void registerRepoEventListener(IProvisioningEventBus eventBus) { if (busListener == null) { - busListener = new SynchronousProvisioningListener() { - public void notify(EventObject o) { - if (o instanceof RepositoryEvent) { - RepositoryEvent event = (RepositoryEvent) o; - if (RepositoryEvent.REMOVED == event.getKind() && IRepository.TYPE_METADATA == event.getRepositoryType()) { - deleteCache(event.getRepositoryLocation()); - } + busListener = o -> { + if (o instanceof RepositoryEvent) { + RepositoryEvent event = (RepositoryEvent) o; + if (RepositoryEvent.REMOVED == event.getKind() && IRepository.TYPE_METADATA == event.getRepositoryType()) { + deleteCache(event.getRepositoryLocation()); } } }; diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManagerComponent.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManagerComponent.java index 140c28668..44b1a307f 100644 --- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManagerComponent.java +++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/CacheManagerComponent.java @@ -1,11 +1,11 @@ /*******************************************************************************
* Copyright (c) 2010 Sonatype, Inc and others.
- * + *
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/ - * + * https://www.eclipse.org/legal/epl-2.0/
+ *
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
@@ -20,6 +20,7 @@ import org.eclipse.equinox.p2.core.spi.IAgentServiceFactory; public class CacheManagerComponent implements IAgentServiceFactory {
+ @Override
public Object createService(IProvisioningAgent agent) {
final IProvisioningEventBus eventBus = (IProvisioningEventBus) agent.getService(IProvisioningEventBus.SERVICE_NAME);
CacheManager cache = new CacheManager((IAgentLocation) agent.getService(IAgentLocation.SERVICE_NAME), (Transport) agent.getService(Transport.SERVICE_NAME));
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/ProgressStatistics.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/ProgressStatistics.java index 3d5b0083b..20d82f795 100644 --- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/ProgressStatistics.java +++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/ProgressStatistics.java @@ -174,6 +174,7 @@ public class ProgressStatistics { return false; } + @Override public String toString() { return createReportString(); } diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java index f6d692a76..c3113c67f 100644 --- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java +++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java @@ -140,9 +140,7 @@ public abstract class AbstractRepositoryManager<T> implements IRepositoryManager broadcastChangeEvent(repository.getLocation(), getRepositoryType(), RepositoryEvent.ADDED, true); } - /* (non-Javadoc) - * @see org.eclipse.equinox.internal.provisional.p2.core.repository.IRepositoryManager#addRepository(java.net.URI) - */ + @Override public void addRepository(URI location) { checkValidLocation(location); //add the repository, or enable it if already known @@ -249,9 +247,7 @@ public abstract class AbstractRepositoryManager<T> implements IRepositoryManager } } - /* (non-Javadoc) - * @see org.eclipse.equinox.internal.provisional.p2.core.repository.IRepositoryManager#contains(java.net.URI) - */ + @Override public boolean contains(URI location) { checkValidLocation(location); synchronized (repositoryLock) { @@ -470,13 +466,12 @@ public abstract class AbstractRepositoryManager<T> implements IRepositoryManager return key; } + @Override public IProvisioningAgent getAgent() { return agent; } - /* (non-Javadoc) - * @see org.eclipse.equinox.internal.provisional.p2.core.repository.IRepositoryManager#getKnownRepositories(int) - */ + @Override public URI[] getKnownRepositories(int flags) { synchronized (repositoryLock) { if (repositories == null) @@ -557,9 +552,7 @@ public abstract class AbstractRepositoryManager<T> implements IRepositoryManager return null; } - /*(non-Javadoc) - * @see org.eclipse.equinox.internal.provisional.p2.core.repository.IRepositoryManager#getRepositoryProperty(java.net.URI, java.lang.String) - */ + @Override public String getRepositoryProperty(URI location, String key) { checkValidLocation(location); synchronized (repositoryLock) { @@ -581,9 +574,7 @@ public abstract class AbstractRepositoryManager<T> implements IRepositoryManager } } - /*(non-Javadoc) - * @see org.eclipse.equinox.internal.provisional.p2.core.repository.IRepositoryManager#getRepositoryProperty(java.net.URI, java.lang.String) - */ + @Override public void setRepositoryProperty(URI location, String key, String value) { checkValidLocation(location); synchronized (repositoryLock) { @@ -626,9 +617,7 @@ public abstract class AbstractRepositoryManager<T> implements IRepositoryManager */ protected abstract String[] getPreferredRepositorySearchOrder(LocationProperties properties); - /* (non-Javadoc) - * @see org.eclipse.equinox.internal.provisional.p2.core.repository.IRepositoryManager#isEnabled(java.net.URI) - */ + @Override public boolean isEnabled(URI location) { synchronized (repositoryLock) { if (repositories == null) @@ -812,9 +801,7 @@ public abstract class AbstractRepositoryManager<T> implements IRepositoryManager return true; } - /*(non-Javadoc) - * @see org.eclipse.equinox.internal.provisional.p2.core.eventbus.ProvisioningListener#notify(java.util.EventObject) - */ + @Override public void notify(EventObject o) { if (o instanceof RepositoryEvent) { RepositoryEvent event = (RepositoryEvent) o; @@ -918,6 +905,7 @@ public abstract class AbstractRepositoryManager<T> implements IRepositoryManager unavailableRepositories = new SoftReference<List<URI>>(badRepos); } + @Override public boolean removeRepository(URI toRemove) { return removeRepository(checkValidLocation(toRemove), true); } @@ -1040,9 +1028,7 @@ public abstract class AbstractRepositoryManager<T> implements IRepositoryManager } } - /* (non-Javadoc) - * @see org.eclipse.equinox.internal.provisional.p2.core.repository.IRepositoryManager#setEnabled(java.net.URI, boolean) - */ + @Override public void setEnabled(URI location, boolean enablement) { checkValidLocation(location); synchronized (repositoryLock) { @@ -1057,16 +1043,12 @@ public abstract class AbstractRepositoryManager<T> implements IRepositoryManager broadcastChangeEvent(location, getRepositoryType(), RepositoryEvent.ENABLEMENT, enablement); } - /*(non-Javadoc) - * @see org.eclipse.equinox.p2.core.spi.IAgentService#start() - */ + @Override public void start() { //nothing to do } - /*(non-Javadoc) - * @see org.eclipse.equinox.p2.core.spi.IAgentService#stop() - */ + @Override public void stop() { eventBus.removeListener(this); //ensure all repository state in memory is written to disk @@ -1158,6 +1140,7 @@ public abstract class AbstractRepositoryManager<T> implements IRepositoryManager * reporting is not desired * @return A collector containing the results of the query */ + @Override public IQueryResult<T> query(IQuery<T> query, IProgressMonitor monitor) { URI[] locations = getKnownRepositories(REPOSITORIES_ALL); List<IRepository<T>> queryables = new ArrayList<IRepository<T>>(locations.length); // use a list since we don't know exactly how many will load diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/RepositoryEvent.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/RepositoryEvent.java index 3eb0a93ab..1bd45ef28 100644 --- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/RepositoryEvent.java +++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/provisional/p2/repository/RepositoryEvent.java @@ -152,10 +152,7 @@ public class RepositoryEvent extends EventObject { return isEnabled; } - /* - * (non-Javadoc) - * @see java.util.EventObject#toString() - */ + @Override public String toString() { StringBuffer buffer = new StringBuffer(); buffer.append("RepositoryEvent["); //$NON-NLS-1$ diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactRepository.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactRepository.java index eb6bf986e..870e2eb27 100644 --- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactRepository.java +++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/IArtifactRepository.java @@ -74,6 +74,7 @@ public interface IArtifactRepository extends IRepository<IArtifactKey> { * @param descriptor the descriptor to add. * @deprecated See {{@link #addDescriptor(IArtifactDescriptor, IProgressMonitor)} */ + @Deprecated public void addDescriptor(IArtifactDescriptor descriptor); /** @@ -93,6 +94,7 @@ public interface IArtifactRepository extends IRepository<IArtifactKey> { * @param descriptors the artifact descriptors to add * @deprecated See {{@link #addDescriptors(IArtifactDescriptor[], IProgressMonitor)} */ + @Deprecated public void addDescriptors(IArtifactDescriptor[] descriptors); /** @@ -186,6 +188,7 @@ public interface IArtifactRepository extends IRepository<IArtifactKey> { * Remove the all keys, descriptors, and contents from this repository. * @deprecated See {@link #removeAll(IProgressMonitor)} */ + @Deprecated public void removeAll(); /** @@ -201,6 +204,7 @@ public interface IArtifactRepository extends IRepository<IArtifactKey> { * @param descriptor the descriptor to remove. * @deprecated See {@link #removeDescriptor(IArtifactDescriptor, IProgressMonitor)} */ + @Deprecated public void removeDescriptor(IArtifactDescriptor descriptor); /** @@ -217,6 +221,7 @@ public interface IArtifactRepository extends IRepository<IArtifactKey> { * @param key the key to remove. * @deprecated See {@link #removeDescriptor(IArtifactKey, IProgressMonitor)} */ + @Deprecated public void removeDescriptor(IArtifactKey key); /** @@ -235,6 +240,7 @@ public interface IArtifactRepository extends IRepository<IArtifactKey> { * @since 2.1 * @deprecated See {@link #removeDescriptors(IArtifactDescriptor[], IProgressMonitor)} */ + @Deprecated public void removeDescriptors(IArtifactDescriptor[] descriptors); /** @@ -254,6 +260,7 @@ public interface IArtifactRepository extends IRepository<IArtifactKey> { * @since 2.1 * @deprecated See {@link #removeDescriptors(IArtifactKey[], IProgressMonitor)} */ + @Deprecated public void removeDescriptors(IArtifactKey[] keys); /** diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/AbstractArtifactRepository.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/AbstractArtifactRepository.java index 05e559a85..8820d041b 100644 --- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/AbstractArtifactRepository.java +++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/AbstractArtifactRepository.java @@ -42,21 +42,28 @@ public abstract class AbstractArtifactRepository extends AbstractRepository<IArt super(agent, name, type, version, location, description, provider, properties); } + @Override public abstract boolean contains(IArtifactDescriptor descriptor); + @Override public abstract boolean contains(IArtifactKey key); + @Override public abstract IStatus getArtifact(IArtifactDescriptor descriptor, OutputStream destination, IProgressMonitor monitor); + @Override public abstract IArtifactDescriptor[] getArtifactDescriptors(IArtifactKey key); + @Override public abstract IStatus getArtifacts(IArtifactRequest[] requests, IProgressMonitor monitor); + @Override public abstract OutputStream getOutputStream(IArtifactDescriptor descriptor) throws ProvisionException; /** * @since 2.1 */ + @Override public void addDescriptor(IArtifactDescriptor descriptor, IProgressMonitor monitor) { assertModifiable(); } @@ -64,6 +71,8 @@ public abstract class AbstractArtifactRepository extends AbstractRepository<IArt /** * @deprecated Use {@link #addDescriptor(IArtifactDescriptor, IProgressMonitor)} instead. */ + @Override + @Deprecated public void addDescriptor(IArtifactDescriptor descriptor) { this.addDescriptor(descriptor, new NullProgressMonitor()); } @@ -72,6 +81,7 @@ public abstract class AbstractArtifactRepository extends AbstractRepository<IArt * {@inheritDoc} * @since 2.1 */ + @Override public void addDescriptors(IArtifactDescriptor[] descriptors, IProgressMonitor monitor) { assertModifiable(); } @@ -79,6 +89,8 @@ public abstract class AbstractArtifactRepository extends AbstractRepository<IArt /** * @deprecated Use {@link #addDescriptors(IArtifactDescriptor[], IProgressMonitor)} instead. */ + @Override + @Deprecated public void addDescriptors(IArtifactDescriptor[] descriptors) { this.addDescriptors(descriptors, new NullProgressMonitor()); } @@ -87,6 +99,7 @@ public abstract class AbstractArtifactRepository extends AbstractRepository<IArt * {@inheritDoc} * @since 2.1 */ + @Override public void removeDescriptor(IArtifactDescriptor descriptor, IProgressMonitor monitor) { assertModifiable(); } @@ -94,6 +107,8 @@ public abstract class AbstractArtifactRepository extends AbstractRepository<IArt /** * @deprecated Use {@link #removeDescriptor(IArtifactDescriptor, IProgressMonitor)} instead. */ + @Override + @Deprecated public void removeDescriptor(IArtifactDescriptor descriptor) { this.removeDescriptor(descriptor, new NullProgressMonitor()); } @@ -102,6 +117,7 @@ public abstract class AbstractArtifactRepository extends AbstractRepository<IArt * {@inheritDoc} * @since 2.1 */ + @Override public void removeDescriptors(IArtifactDescriptor[] descriptors, IProgressMonitor monitor) { assertModifiable(); } @@ -111,6 +127,8 @@ public abstract class AbstractArtifactRepository extends AbstractRepository<IArt * @since 2.1 * @deprecated Use {@link #removeDescriptors(IArtifactDescriptor[], IProgressMonitor)} instead. */ + @Override + @Deprecated public void removeDescriptors(IArtifactDescriptor[] descriptors) { this.removeDescriptors(descriptors, new NullProgressMonitor()); } @@ -119,6 +137,7 @@ public abstract class AbstractArtifactRepository extends AbstractRepository<IArt * {@inheritDoc} * @since 2.1 */ + @Override public void removeDescriptor(IArtifactKey key, IProgressMonitor monitor) { assertModifiable(); } @@ -126,6 +145,8 @@ public abstract class AbstractArtifactRepository extends AbstractRepository<IArt /** * @deprecated Use {@link #removeDescriptor(IArtifactKey, IProgressMonitor)} instead. */ + @Override + @Deprecated public void removeDescriptor(IArtifactKey key) { this.removeDescriptor(key, new NullProgressMonitor()); } @@ -134,6 +155,7 @@ public abstract class AbstractArtifactRepository extends AbstractRepository<IArt * {@inheritDoc} * @since 2.1 */ + @Override public void removeDescriptors(IArtifactKey[] keys, IProgressMonitor monitor) { assertModifiable(); } @@ -143,6 +165,8 @@ public abstract class AbstractArtifactRepository extends AbstractRepository<IArt * @since 2.1 * @deprecated Use {@link #removeDescriptors(IArtifactKey[], IProgressMonitor)} instead. */ + @Override + @Deprecated public void removeDescriptors(IArtifactKey[] keys) { this.removeDescriptors(keys, new NullProgressMonitor()); } @@ -150,6 +174,7 @@ public abstract class AbstractArtifactRepository extends AbstractRepository<IArt /** * @since 2.1 */ + @Override public void removeAll(IProgressMonitor monitor) { assertModifiable(); } @@ -157,10 +182,13 @@ public abstract class AbstractArtifactRepository extends AbstractRepository<IArt /** * @deprecated Use {@link #removeAll(IProgressMonitor)} instead. */ + @Override + @Deprecated public void removeAll() { this.removeAll(new NullProgressMonitor()); } + @Override public boolean equals(Object o) { if (this == o) { return true; @@ -173,18 +201,22 @@ public abstract class AbstractArtifactRepository extends AbstractRepository<IArt return false; } + @Override public int hashCode() { return (this.getLocation().toString().hashCode()) * 87; } + @Override public IArtifactDescriptor createArtifactDescriptor(IArtifactKey key) { return new ArtifactDescriptor(key); } + @Override public IArtifactKey createArtifactKey(String classifier, String id, Version version) { return new ArtifactKey(classifier, id, version); } + @Override public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor) { try { runnable.run(monitor); diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/ArtifactDescriptor.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/ArtifactDescriptor.java index 7796f1792..4ff52e2d8 100644 --- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/ArtifactDescriptor.java +++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/ArtifactDescriptor.java @@ -70,10 +70,12 @@ public class ArtifactDescriptor implements IArtifactDescriptor, IMemberProvider /* (non-Javadoc) * @see org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor#getArtifactKey() */ + @Override public IArtifactKey getArtifactKey() { return key; } + @Override public String getProperty(String propertyKey) { return properties.get(propertyKey); } @@ -93,10 +95,12 @@ public class ArtifactDescriptor implements IArtifactDescriptor, IMemberProvider * Returns a read-only collection of the properties of the artifact descriptor. * @return the properties of this artifact descriptor. */ + @Override public Map<String, String> getProperties() { return OrderedProperties.unmodifiableProperties(properties); } + @Override public IProcessingStepDescriptor[] getProcessingSteps() { return processingSteps; } @@ -105,6 +109,7 @@ public class ArtifactDescriptor implements IArtifactDescriptor, IMemberProvider processingSteps = value == null || value.length == 0 ? EMPTY_STEPS : value; } + @Override public boolean equals(Object obj) { if (this == obj) return true; @@ -133,6 +138,7 @@ public class ArtifactDescriptor implements IArtifactDescriptor, IMemberProvider return true; } + @Override public int hashCode() { String format = getProperty(FORMAT); @@ -144,6 +150,7 @@ public class ArtifactDescriptor implements IArtifactDescriptor, IMemberProvider return result; } + @Override public IArtifactRepository getRepository() { return repository; } @@ -152,6 +159,7 @@ public class ArtifactDescriptor implements IArtifactDescriptor, IMemberProvider repository = value; } + @Override public String toString() { String format = getProperty(IArtifactDescriptor.FORMAT); if (format == null) @@ -159,6 +167,7 @@ public class ArtifactDescriptor implements IArtifactDescriptor, IMemberProvider return format + ": " + key.toString(); //$NON-NLS-1$ } + @Override public Object getMember(String memberName) { if (memberName == MEMBER_ARTIFACT_KEY) return key; diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/ProcessingStepDescriptor.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/ProcessingStepDescriptor.java index a055b5ab5..66c75a0ef 100644 --- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/ProcessingStepDescriptor.java +++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/artifact/spi/ProcessingStepDescriptor.java @@ -38,30 +38,22 @@ public class ProcessingStepDescriptor implements IProcessingStepDescriptor { this.required = required; } - /** - * {@inheritDoc} - */ + @Override public String getProcessorId() { return processorId; } - /** - * {@inheritDoc} - */ + @Override public String getData() { return data; } - /** - * {@inheritDoc} - */ + @Override public boolean isRequired() { return required; } - /** - * {@inheritDoc} - */ + @Override public int hashCode() { final int prime = 31; int result = 1; @@ -71,9 +63,7 @@ public class ProcessingStepDescriptor implements IProcessingStepDescriptor { return result; } - /** - * {@inheritDoc} - */ + @Override public boolean equals(Object obj) { if (this == obj) return true; @@ -101,6 +91,7 @@ public class ProcessingStepDescriptor implements IProcessingStepDescriptor { * Returns a string representation of this descriptor for debugging purposes only. * @return a string representation ofthe processing step descriptor */ + @Override public String toString() { return "Processor: " + processorId + (required ? "(req)" : "(notReq)") + " ,data: " + data; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$ } diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/metadata/spi/AbstractMetadataRepository.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/metadata/spi/AbstractMetadataRepository.java index 3eb5dc53c..78d214d59 100644 --- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/metadata/spi/AbstractMetadataRepository.java +++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/metadata/spi/AbstractMetadataRepository.java @@ -112,38 +112,28 @@ public abstract class AbstractMetadataRepository extends AbstractRepository<IIns super(agent, name, type, version, location, description, provider, properties); } - /** - * {@inheritDoc} - */ + @Override public void addInstallableUnits(Collection<IInstallableUnit> installableUnits) { assertModifiable(); } - /** - * {@inheritDoc} - */ + @Override public void addReferences(Collection<? extends IRepositoryReference> references) { assertModifiable(); } - /** - * {@inheritDoc} - */ + @Override public void removeAll() { assertModifiable(); } - /** - * {@inheritDoc} - */ + @Override public boolean removeInstallableUnits(Collection<IInstallableUnit> installableUnits) { assertModifiable(); return false; } - /** - * {@inheritDoc} - */ + @Override public IStatus executeBatch(IRunnableWithProgress runnable, IProgressMonitor monitor) { try { runnable.run(monitor); @@ -155,12 +145,10 @@ public abstract class AbstractMetadataRepository extends AbstractRepository<IIns return Status.OK_STATUS; } - /* (non-Javadoc) - * @see org.eclipse.equinox.p2.repository.metadata.IMetadataRepository#compress(IPool<IInstallableUnit> iuPool) - */ /** * @since 2.1 */ + @Override public void compress(IPool<IInstallableUnit> iuPool) { // Default no-op. Subclasses should override as appropriate } diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/spi/AbstractRepository.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/spi/AbstractRepository.java index 44b7450f8..9eb3f6737 100644 --- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/spi/AbstractRepository.java +++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/spi/AbstractRepository.java @@ -78,6 +78,7 @@ public abstract class AbstractRepository<T> extends PlatformObject implements IR * Returns a brief description of the repository. * @return the description of the repository. */ + @Override public synchronized String getDescription() { return description; } @@ -86,6 +87,7 @@ public abstract class AbstractRepository<T> extends PlatformObject implements IR * Returns the location of this repository. * @return the URI of the repository. */ + @Override public synchronized URI getLocation() { return location; } @@ -94,6 +96,7 @@ public abstract class AbstractRepository<T> extends PlatformObject implements IR * Returns the name of the repository. * @return the name of the repository. */ + @Override public synchronized String getName() { return name; } @@ -102,13 +105,12 @@ public abstract class AbstractRepository<T> extends PlatformObject implements IR * Returns a read-only collection of the properties of the repository. * @return the properties of this repository. */ + @Override public synchronized Map<String, String> getProperties() { return OrderedProperties.unmodifiableProperties(properties); } - /** - * {@inheritDoc} - */ + @Override public String getProperty(String key) { return properties.get(key); } @@ -117,6 +119,7 @@ public abstract class AbstractRepository<T> extends PlatformObject implements IR * Returns the name of the provider of the repository. * @return the provider of this repository. */ + @Override public synchronized String getProvider() { return provider; } @@ -126,6 +129,7 @@ public abstract class AbstractRepository<T> extends PlatformObject implements IR * * @return the provisioning agent */ + @Override public IProvisioningAgent getProvisioningAgent() { return agent; } @@ -134,6 +138,7 @@ public abstract class AbstractRepository<T> extends PlatformObject implements IR * Returns a string representing the type of the repository. * @return the type of the repository. */ + @Override public synchronized String getType() { return type; } @@ -142,13 +147,12 @@ public abstract class AbstractRepository<T> extends PlatformObject implements IR * Returns a string representing the version for the repository type. * @return the version of the type of the repository. */ + @Override public synchronized String getVersion() { return version; } - /** - * {@inheritDoc} - */ + @Override public boolean isModifiable() { return false; } @@ -172,9 +176,9 @@ public abstract class AbstractRepository<T> extends PlatformObject implements IR } /** - * {@inheritDoc} * @since 2.1 */ + @Override public synchronized String setProperty(String key, String value, IProgressMonitor monitor) { assertModifiable(); if (key.equals(IRepository.PROP_NAME)) { @@ -185,9 +189,7 @@ public abstract class AbstractRepository<T> extends PlatformObject implements IR return (value == null ? properties.remove(key) : properties.put(key, value)); } - /** - * {@inheritDoc} - */ + @Override public synchronized String setProperty(String key, String value) { return this.setProperty(key, value, new NullProgressMonitor()); } diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/spi/RepositoryReference.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/spi/RepositoryReference.java index 0facc874d..feba9fe7f 100644 --- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/spi/RepositoryReference.java +++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/p2/repository/spi/RepositoryReference.java @@ -57,9 +57,7 @@ public class RepositoryReference implements IRepositoryReference { this.nickname = nickname; } - /** - * {@inheritDoc} - */ + @Override public boolean equals(Object obj) { if (this == obj) return true; @@ -76,37 +74,27 @@ public class RepositoryReference implements IRepositoryReference { return true; } - /** - * {@inheritDoc} - */ + @Override public URI getLocation() { return location; } - /** - * {@inheritDoc} - */ + @Override public int getType() { return type; } - /** - * {@inheritDoc} - */ + @Override public int getOptions() { return options; } - /** - * {@inheritDoc} - */ + @Override public String getNickname() { return nickname; } - /** - * {@inheritDoc} - */ + @Override public int hashCode() { final int prime = 31; int result = 1; |