Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2016-07-06 15:44:08 +0000
committerThomas Watson2016-07-06 19:21:41 +0000
commit2ec8c52c2cf5c575e69533a479f32257566d4236 (patch)
tree19b573aa6228cebac1ae37fb5459667edef89ada /bundles/org.eclipse.osgi/container
parentadda20fca8b82495927ba45d158b53e22a5ca7f8 (diff)
downloadrt.equinox.framework-2ec8c52c2cf5c575e69533a479f32257566d4236.tar.gz
rt.equinox.framework-2ec8c52c2cf5c575e69533a479f32257566d4236.tar.xz
rt.equinox.framework-2ec8c52c2cf5c575e69533a479f32257566d4236.zip
Bug 497407 - Handle @initial locations for bundle update operationsY20160707-1000
Change-Id: I396cf341934c0de5f0b589ba691a913f0745766a Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
Diffstat (limited to 'bundles/org.eclipse.osgi/container')
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java
index 2170875bd..eb554cddc 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java
@@ -62,6 +62,7 @@ public class Storage {
private static final String JAVASE = "JavaSE"; //$NON-NLS-1$
private static final String PROFILE_EXT = ".profile"; //$NON-NLS-1$
private static final String NUL = new String(new byte[] {0});
+ private static final String INITIAL_LOCATION = "initial@"; //$NON-NLS-1$
static final SecureAction secureAction = AccessController.doPrivileged(SecureAction.createSecureAction());
@@ -448,7 +449,13 @@ public class Storage {
ModuleRevision current = module.getCurrentRevision();
Generation generation = (Generation) current.getRevisionInfo();
String updateLocation = generation.getHeaders().get(Constants.BUNDLE_UPDATELOCATION);
- return updateLocation == null ? module.getLocation() : updateLocation;
+ if (updateLocation == null) {
+ updateLocation = module.getLocation();
+ }
+ if (updateLocation.startsWith(INITIAL_LOCATION)) {
+ updateLocation = updateLocation.substring(INITIAL_LOCATION.length());
+ }
+ return updateLocation;
}
private URLConnection getContentConnection(final String spec) throws IOException {

Back to the top