diff options
author | Alexander Kurtakov | 2017-08-20 06:25:45 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2017-08-20 06:25:45 +0000 |
commit | ad2ea73909b67c8687b14eb12f608b7862f9eaca (patch) | |
tree | 3c6f6823e09690e52aa13f8f4259711992a8eb55 /bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteFeature.java | |
parent | 20c737d78adb1722d14ded8902b2d091f4117dc8 (diff) | |
download | rt.equinox.p2-ad2ea73909b67c8687b14eb12f608b7862f9eaca.tar.gz rt.equinox.p2-ad2ea73909b67c8687b14eb12f608b7862f9eaca.tar.xz rt.equinox.p2-ad2ea73909b67c8687b14eb12f608b7862f9eaca.zip |
Bug 521156 - Move p2 updatesite bundle to Java 8
Bump minor version, add missing Override annotations, remove duplicated
type declarations, lambda conversions.
Change-Id: Ida3bbc9351433f345ba6c405ede235390f541feb
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteFeature.java')
-rw-r--r-- | bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteFeature.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteFeature.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteFeature.java index 96bbee170..b6af32bdf 100644 --- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteFeature.java +++ b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteFeature.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2010 IBM Corporation and others. + * Copyright (c) 2000, 2017 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -99,7 +99,7 @@ public class SiteFeature { */ public void addCategoryName(String categoryName) { if (this.categoryNames == null) - this.categoryNames = new ArrayList<String>(); + this.categoryNames = new ArrayList<>(); if (!this.categoryNames.contains(categoryName)) this.categoryNames.add(categoryName); } @@ -125,6 +125,7 @@ public class SiteFeature { * @return <code>true</code> if the two models are equal, * <code>false</code> otherwise */ + @Override public boolean equals(Object object) { if (object == null) return false; @@ -152,6 +153,7 @@ public class SiteFeature { /* (non-Javadoc) * @see java.lang.Object#hashCode() */ + @Override public int hashCode() { final int prime = 31; int result = 1; @@ -337,7 +339,7 @@ public class SiteFeature { if (categoryNames == null) this.categoryNames = null; else - this.categoryNames = new ArrayList<String>(Arrays.asList(categoryNames)); + this.categoryNames = new ArrayList<>(Arrays.asList(categoryNames)); } /** @@ -439,6 +441,7 @@ public class SiteFeature { /** * @see Object#toString() */ + @Override public String toString() { StringBuffer buffer = new StringBuffer(); if (featureId != null) |