Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2017-09-04 15:21:00 +0000
committerAlexander Kurtakov2017-09-04 16:00:58 +0000
commit480ab878fa72d346a326456d1ea15625f4093f5e (patch)
tree7e69939e0202790c98779b67c71a09e313b07cb0 /bundles/org.eclipse.equinox.p2.discovery
parent84c0010b4087047b6a2266bcda21d21dbcb595fd (diff)
downloadrt.equinox.p2-480ab878fa72d346a326456d1ea15625f4093f5e.tar.gz
rt.equinox.p2-480ab878fa72d346a326456d1ea15625f4093f5e.tar.xz
rt.equinox.p2-480ab878fa72d346a326456d1ea15625f4093f5e.zip
Bug 521839 - Move discovery bundle to Java 8
* Bump BREE. * Bump minor version for the BREE change. * Enable more warnings. * Remove redundant type declarations. Change-Id: I9b595b0c7481280b3ad8f308a55ff32936ac7bbf Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.discovery')
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/.classpath2
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.jdt.core.prefs46
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/META-INF/MANIFEST.MF4
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/pom.xml2
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/Catalog.java26
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/DiscoveryCore.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/CatalogCategory.java6
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/CatalogItem.java11
8 files changed, 67 insertions, 34 deletions
diff --git a/bundles/org.eclipse.equinox.p2.discovery/.classpath b/bundles/org.eclipse.equinox.p2.discovery/.classpath
index 93640193e..5f1595b77 100644
--- a/bundles/org.eclipse.equinox.p2.discovery/.classpath
+++ b/bundles/org.eclipse.equinox.p2.discovery/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
<accessrules>
<accessrule kind="accessible" pattern="org/eclipse/equinox/internal/p2/core/**"/>
diff --git a/bundles/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.jdt.core.prefs
index c65423da1..6b05c7a68 100644
--- a/bundles/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.jdt.core.prefs
+++ b/bundles/org.eclipse.equinox.p2.discovery/.settings/org.eclipse.jdt.core.prefs
@@ -1,4 +1,3 @@
-#Wed Feb 17 14:07:15 PST 2010
eclipse.preferences.version=1
org.eclipse.jdt.core.builder.cleanOutputFolder=clean
org.eclipse.jdt.core.builder.duplicateResourceTask=warning
@@ -8,10 +7,19 @@ 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.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.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -28,6 +36,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
@@ -35,6 +44,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
@@ -42,7 +52,9 @@ org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning
+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
@@ -50,29 +62,47 @@ 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
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
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning
+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=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
@@ -80,6 +110,7 @@ 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
@@ -89,9 +120,10 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.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
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
diff --git a/bundles/org.eclipse.equinox.p2.discovery/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.p2.discovery/META-INF/MANIFEST.MF
index 932693e10..2ae1bb4e9 100644
--- a/bundles/org.eclipse.equinox.p2.discovery/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.equinox.p2.discovery/META-INF/MANIFEST.MF
@@ -2,9 +2,9 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.eclipse.equinox.p2.discovery;singleton:=true
-Bundle-Version: 1.0.400.qualifier
+Bundle-Version: 1.1.0.qualifier
Bundle-Vendor: %Bundle-Vendor
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.3.0",
org.eclipse.equinox.p2.core;bundle-version="2.0.0"
Export-Package: org.eclipse.equinox.internal.p2.discovery;x-friends:="org.eclipse.equinox.p2.discovery.compatibility,org.eclipse.equinox.p2.ui.discovery,org.eclipse.equinox.p2.discovery.repository",
diff --git a/bundles/org.eclipse.equinox.p2.discovery/pom.xml b/bundles/org.eclipse.equinox.p2.discovery/pom.xml
index 1ca02d8f2..e4f525d73 100644
--- a/bundles/org.eclipse.equinox.p2.discovery/pom.xml
+++ b/bundles/org.eclipse.equinox.p2.discovery/pom.xml
@@ -9,6 +9,6 @@
</parent>
<groupId>org.eclipse.equinox</groupId>
<artifactId>org.eclipse.equinox.p2.discovery</artifactId>
- <version>1.0.400-SNAPSHOT</version>
+ <version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
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 5ac314a36..62874cf5d 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 Tasktop Technologies and others.
+ * Copyright (c) 2009, 2017 Tasktop Technologies and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -33,7 +33,7 @@ public class Catalog {
private List<CatalogItem> filteredItems = Collections.emptyList();
- private final List<AbstractDiscoveryStrategy> discoveryStrategies = new ArrayList<AbstractDiscoveryStrategy>();
+ private final List<AbstractDiscoveryStrategy> discoveryStrategies = new ArrayList<>();
private List<Tag> tags = Collections.emptyList();
@@ -63,10 +63,10 @@ public class Catalog {
if (discoveryStrategies.isEmpty()) {
throw new IllegalStateException();
}
- List<CatalogItem> newItems = new ArrayList<CatalogItem>();
- List<CatalogCategory> newCategories = new ArrayList<CatalogCategory>();
- List<Certification> newCertifications = new ArrayList<Certification>();
- List<Tag> newTags = new ArrayList<Tag>();
+ List<CatalogItem> newItems = new ArrayList<>();
+ List<CatalogCategory> newCategories = new ArrayList<>();
+ List<Certification> newCertifications = new ArrayList<>();
+ List<Tag> newTags = new ArrayList<>();
final int totalTicks = 100000;
final int discoveryTicks = totalTicks - (totalTicks / 10);
@@ -100,7 +100,7 @@ public class Catalog {
this.items = newItems;
this.certifications = newCertifications;
this.tags = newTags;
- this.filteredItems = new ArrayList<CatalogItem>();
+ this.filteredItems = new ArrayList<>();
filterDescriptors();
connectCategoriesToDescriptors();
@@ -203,7 +203,7 @@ public class Catalog {
}
private void connectCertificationsToDescriptors() {
- Map<String, Certification> idToCertification = new HashMap<String, Certification>();
+ Map<String, Certification> idToCertification = new HashMap<>();
for (Certification certification : certifications) {
Certification previous = idToCertification.put(certification.getId(), certification);
if (previous != null) {
@@ -226,7 +226,7 @@ public class Catalog {
}
private void connectCategoriesToDescriptors() {
- Map<String, CatalogCategory> idToCategory = new HashMap<String, CatalogCategory>();
+ Map<String, CatalogCategory> idToCategory = new HashMap<>();
for (CatalogCategory category : categories) {
CatalogCategory previous = idToCategory.put(category.getId(), category);
if (previous != null) {
@@ -250,7 +250,7 @@ public class Catalog {
*/
@SuppressWarnings({"rawtypes", "unchecked"})
private void filterDescriptors() {
- for (CatalogItem connector : new ArrayList<CatalogItem>(items)) {
+ for (CatalogItem connector : new ArrayList<>(items)) {
if (connector.getPlatformFilter() != null && connector.getPlatformFilter().trim().length() > 0) {
boolean match = false;
try {
@@ -288,7 +288,7 @@ public class Catalog {
}
private Map<String, Version> computeFeatureToVersion() {
- Map<String, Version> map = new HashMap<String, Version>();
+ Map<String, Version> map = new HashMap<>();
for (IBundleGroupProvider provider : Platform.getBundleGroupProviders()) {
for (IBundleGroup bundleGroup : provider.getBundleGroups()) {
for (Bundle bundle : bundleGroup.getBundles()) {
@@ -303,10 +303,12 @@ public class Catalog {
for (final AbstractDiscoveryStrategy strategy : discoveryStrategies) {
SafeRunner.run(new ISafeRunnable() {
+ @Override
public void run() throws Exception {
strategy.dispose();
}
+ @Override
public void handleException(Throwable exception) {
LogHelper.log(new Status(IStatus.ERROR, DiscoveryCore.ID_PLUGIN, Messages.Catalog_exception_disposing + strategy.getClass().getName(), exception));
}
@@ -315,7 +317,7 @@ public class Catalog {
}
public void setTags(List<Tag> tags) {
- this.tags = new ArrayList<Tag>(tags);
+ this.tags = new ArrayList<>(tags);
}
}
diff --git a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/DiscoveryCore.java b/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/DiscoveryCore.java
index 8e6ecdfc2..9c573fb3a 100644
--- a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/DiscoveryCore.java
+++ b/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/DiscoveryCore.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 Tasktop Technologies and others.
+ * Copyright (c) 2009, 2017 Tasktop Technologies and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -26,7 +26,7 @@ public abstract class DiscoveryCore {
}
public static Dictionary<Object, Object> createEnvironment() {
- Dictionary<Object, Object> environment = new Hashtable<Object, Object>(System.getProperties());
+ Dictionary<Object, Object> environment = new Hashtable<>(System.getProperties());
// add the installed Mylyn version to the environment so that we can
// have
// connectors that are filtered based on version of Mylyn
diff --git a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/CatalogCategory.java b/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/CatalogCategory.java
index a8560a6ad..568ea6048 100644
--- a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/CatalogCategory.java
+++ b/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/CatalogCategory.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 Tasktop Technologies and others.
+ * Copyright (c) 2009, 2017 Tasktop Technologies and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -21,7 +21,7 @@ public class CatalogCategory extends AbstractCatalogItem {
private AbstractCatalogSource source;
- private final List<CatalogItem> items = new ArrayList<CatalogItem>();
+ private final List<CatalogItem> items = new ArrayList<>();
protected String id;
@@ -35,7 +35,7 @@ public class CatalogCategory extends AbstractCatalogItem {
protected Overview overview;
- protected java.util.List<Group> group = new java.util.ArrayList<Group>();
+ protected java.util.List<Group> group = new ArrayList<>();
public List<CatalogItem> getItems() {
return items;
diff --git a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/CatalogItem.java b/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/CatalogItem.java
index 5f7e7ec57..cd81824ce 100644
--- a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/CatalogItem.java
+++ b/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/model/CatalogItem.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 Tasktop Technologies and others.
+ * Copyright (c) 2009, 2017 Tasktop Technologies and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -55,9 +55,9 @@ public class CatalogItem extends AbstractCatalogItem {
protected String groupId;
- protected java.util.List<FeatureFilter> featureFilter = new java.util.ArrayList<FeatureFilter>();
+ protected List<FeatureFilter> featureFilter = new ArrayList<>();
- protected java.util.List<String> installableUnits = new java.util.ArrayList<String>();
+ protected List<String> installableUnits = new ArrayList<>();
protected Icon icon;
@@ -340,9 +340,8 @@ public class CatalogItem extends AbstractCatalogItem {
public Set<Tag> getTags() {
if (tags == null) {
return Collections.emptySet();
- } else {
- return Collections.unmodifiableSet(tags);
}
+ return Collections.unmodifiableSet(tags);
}
public boolean hasTag(Tag tag) {
@@ -351,7 +350,7 @@ public class CatalogItem extends AbstractCatalogItem {
public void addTag(Tag tag) {
if (tags == null) {
- tags = new HashSet<Tag>();
+ tags = new HashSet<>();
}
tags.add(tag);
}

Back to the top