diff options
author | Thomas Watson | 2016-02-09 16:40:27 +0000 |
---|---|---|
committer | Thomas Watson | 2016-02-09 16:41:07 +0000 |
commit | 2e8bca2fc054584f7f881cf68d4d782a6b421bd9 (patch) | |
tree | fe2b8a3c789032a93d9119eace5297bb8abeb306 | |
parent | 763d5d1eeed1d7ade79d593c598cfd8889a606cb (diff) | |
download | rt.equinox.framework-2e8bca2fc054584f7f881cf68d4d782a6b421bd9.tar.gz rt.equinox.framework-2e8bca2fc054584f7f881cf68d4d782a6b421bd9.tar.xz rt.equinox.framework-2e8bca2fc054584f7f881cf68d4d782a6b421bd9.zip |
Bug 487524 - extension bundle content is not added on framework creation
if the system.bundle is unresolved
Change-Id: I494a119ec37f0519086bf8d7db6d2ede073b2c99
Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
-rw-r--r-- | bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/SystemBundleLoader.java | 2 | ||||
-rw-r--r-- | bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/SystemBundleLoader.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/SystemBundleLoader.java index e81a4ba8c..f28d7b112 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/SystemBundleLoader.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/loader/SystemBundleLoader.java @@ -127,7 +127,7 @@ public class SystemBundleLoader extends BundleLoader { Module systemModule = getWiring().getRevision().getRevisions().getModule(); for (ModuleRevision fragment : fragments) { try { - this.getGeneration().getBundleInfo().getStorage().getExtensionInstaller().addExtensionContent(fragment, getWiring().getRevision().getRevisions().getModule()); + this.getGeneration().getBundleInfo().getStorage().getExtensionInstaller().addExtensionContent(fragment, systemModule); } catch (BundleException e) { systemModule.getContainer().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, systemModule, e); } 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 839b3124d..4ef8691dc 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 @@ -270,7 +270,12 @@ public class Storage { File contentFile = getSystemContent(); newGeneration.setContent(contentFile, false); moduleContainer.update(systemModule, newBuilder, newGeneration); - moduleContainer.refresh(Arrays.asList(systemModule)); + moduleContainer.refresh(Collections.singleton(systemModule)); + } else { + if (currentRevision.getWiring() == null) { + // must resolve before continuing to ensure extensions get attached + moduleContainer.resolve(Collections.singleton(systemModule), true); + } } } catch (BundleException e) { throw new IllegalStateException("Could not create a builder for the system bundle.", e); //$NON-NLS-1$ |