Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDJ Houghton2010-12-02 21:50:24 +0000
committerDJ Houghton2010-12-02 21:50:24 +0000
commitab24ac0d714449059c1ed1be53ebf3561a1367f8 (patch)
tree771f155ed34ff978ecc7c962e4d96e2167ace6cb /bundles/org.eclipse.equinox.p2.publisher
parent354283b6def3aee6286d63f9cde257acfae4d404 (diff)
downloadrt.equinox.p2-ab24ac0d714449059c1ed1be53ebf3561a1367f8.tar.gz
rt.equinox.p2-ab24ac0d714449059c1ed1be53ebf3561a1367f8.tar.xz
rt.equinox.p2-ab24ac0d714449059c1ed1be53ebf3561a1367f8.zip
Bug 329386 - Optimize manifest TouchPointData memory footprint for MetadataRepositories
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.publisher')
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java17
1 files changed, 11 insertions, 6 deletions
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java
index 4c4d9074d..af9a9b82b 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java
+++ b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/BundlesAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2009 Code 9 and others. All rights reserved. This
+ * Copyright (c) 2008, 2010 Code 9 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 http://www.eclipse.org/legal/epl-v10.html
@@ -378,12 +378,17 @@ public class BundlesAction extends AbstractPublisherAction {
if (p == null)
return null;
StringBuffer result = new StringBuffer();
- for (Entry<String, String> aProperty : p.entrySet()) {
- if (aProperty.getKey().equals(BUNDLE_SHAPE))
- continue;
- result.append(aProperty.getKey()).append(": ").append(aProperty.getValue()).append('\n'); //$NON-NLS-1$
+ // See https://bugs.eclipse.org/329386. We are trying to reduce the size of the manifest data in
+ // the eclipse touchpoint. We've removed the code that requires it but in order for old clients
+ // to still be able to use recent repositories, we're going to keep around the manifest properties
+ // they need.
+ final String[] interestingKeys = new String[] {Constants.BUNDLE_SYMBOLICNAME, Constants.BUNDLE_VERSION, Constants.FRAGMENT_HOST};
+ for (String key : interestingKeys) {
+ String value = p.get(key);
+ if (value != null)
+ result.append(key).append(": ").append(value).append('\n'); //$NON-NLS-1$
}
- return result.toString();
+ return result.length() == 0 ? null : result.toString();
}
// Return a map from locale to property set for the manifest localizations

Back to the top