summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2012-07-17 10:14:20 (EDT)
committerPascal Rapicault2012-07-17 10:14:20 (EDT)
commitf38c5fa5eca2e6f0a9c0faddda43df224f9cf917 (patch)
treed41b9477642d0bf9d0edc772c51a2f392e3842fe
parent9587da532b3c2bd99da6b924c06b653261b7641d (diff)
downloadrt.equinox.p2-f38c5fa5eca2e6f0a9c0faddda43df224f9cf917.zip
rt.equinox.p2-f38c5fa5eca2e6f0a9c0faddda43df224f9cf917.tar.gz
rt.equinox.p2-f38c5fa5eca2e6f0a9c0faddda43df224f9cf917.tar.bz2
Features can appear in more than one categoryv20120717-141420
-rw-r--r--bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteXMLAction.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteXMLAction.java b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteXMLAction.java
index 9dbfd8a..d63a1aa 100644
--- a/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteXMLAction.java
+++ b/bundles/org.eclipse.equinox.p2.updatesite/src/org/eclipse/equinox/internal/p2/updatesite/SiteXMLAction.java
@@ -320,8 +320,11 @@ public class SiteXMLAction extends AbstractPublisherAction {
for (int i = 0; i < features.length; i++) {
//add a mapping for each category this feature belongs to
String[] categoryNames = features[i].getCategoryNames();
- Set<SiteCategory> categories = new HashSet<SiteCategory>();
- mappings.put(features[i], categories);
+ Set<SiteCategory> categories = mappings.get(features[i]);
+ if (categories == null) {
+ categories = new HashSet<SiteCategory>();
+ mappings.put(features[i], categories);
+ }
for (int j = 0; j < categoryNames.length; j++) {
SiteCategory category = site.getCategory(categoryNames[j]);
if (category != null)