diff options
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) |