Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2014-11-03 15:31:18 +0000
committerThomas Watson2014-11-03 15:31:18 +0000
commit9c39affbd127c10e3db2c24a7789e67ceca6f7b6 (patch)
tree4531a528010967fcdb3bab37fffe24cc0cd977d5
parent1b07aee06cd5fff48b74312da73cd4cde921d639 (diff)
downloadrt.equinox.framework-9c39affbd127c10e3db2c24a7789e67ceca6f7b6.tar.gz
rt.equinox.framework-9c39affbd127c10e3db2c24a7789e67ceca6f7b6.tar.xz
rt.equinox.framework-9c39affbd127c10e3db2c24a7789e67ceca6f7b6.zip
Bug 449484 - Add configuration property to allow bundles to provide
osgi.ee and osgi.native capabilities - Update to use osgi.equinox.allow.restricted.provides for the configuration property. Changed to use Storage.allowRestrictedProvides as the field name. Change-Id: I32e0a37bbb8a5d2d63ff5d5226063b8811b997d1 Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
-rw-r--r--bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/SystemBundleTests.java6
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxConfiguration.java2
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java6
3 files changed, 7 insertions, 7 deletions
diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/SystemBundleTests.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/SystemBundleTests.java
index 93d2d3376..d367c4f97 100644
--- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/SystemBundleTests.java
+++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/bundles/SystemBundleTests.java
@@ -2351,7 +2351,7 @@ public class SystemBundleTests extends AbstractBundleTests {
File config = OSGiTestsActivator.getContext().getDataFile(getName()); //$NON-NLS-1$
Map<String, Object> configuration = new HashMap<String, Object>();
configuration.put(Constants.FRAMEWORK_STORAGE, config.getAbsolutePath());
- configuration.put("osgi.tolerate.provide.restricted", "true");
+ configuration.put("osgi.equinox.allow.restricted.provides", "true");
Equinox equinox = new Equinox(configuration);
equinox.start();
@@ -2362,7 +2362,7 @@ public class SystemBundleTests extends AbstractBundleTests {
testBundle.uninstall();
equinox.stop();
- configuration.remove("osgi.tolerate.provide.restricted");
+ configuration.remove("osgi.equinox.allow.restricted.provides");
equinox = new Equinox(configuration);
equinox.start();
systemContext = equinox.getBundleContext();
@@ -2375,7 +2375,7 @@ public class SystemBundleTests extends AbstractBundleTests {
}
equinox.stop();
- configuration.put("osgi.tolerate.provide.restricted", "false");
+ configuration.put("osgi.equinox.allow.restricted.provides", "false");
equinox = new Equinox(configuration);
equinox.start();
systemContext = equinox.getBundleContext();
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxConfiguration.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxConfiguration.java
index 90451e2ba..98ee3a663 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxConfiguration.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxConfiguration.java
@@ -189,7 +189,7 @@ public class EquinoxConfiguration implements EnvironmentInfo {
public static final String PROP_STATE_SAVE_DELAY_INTERVAL = "eclipse.stateSaveDelayInterval"; //$NON-NLS-1$
public static final String PROP_MODULE_LOCK_TIMEOUT = "osgi.module.lock.timeout"; //$NON-NLS-1$
- public static final String PROP_TOLERATE_PROVIDE = "osgi.tolerate.provide.restricted"; //$NON-NLS-1$
+ public static final String PROP_TOLERATE_PROVIDE = "osgi.equinox.allow.restricted.provides"; //$NON-NLS-1$
private final static Collection<String> populateInitConfig = Arrays.asList(PROP_OSGI_ARCH, PROP_OSGI_OS, PROP_OSGI_WS, PROP_OSGI_NL, FRAMEWORK_OS_NAME, FRAMEWORK_OS_VERSION, FRAMEWORK_PROCESSOR, FRAMEWORK_LANGUAGE);
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 80247d0d8..b5ae66154 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
@@ -79,7 +79,7 @@ public class Storage {
private final MRUBundleFileList mruList;
private final FrameworkExtensionInstaller extensionInstaller;
private final List<String> cachedHeaderKeys = Arrays.asList(Constants.BUNDLE_SYMBOLICNAME, Constants.BUNDLE_ACTIVATIONPOLICY, "Service-Component"); //$NON-NLS-1$
- private final boolean tolerateProvideEE;
+ private final boolean allowRestrictedProvides;
public static Storage createStorage(EquinoxContainer container) throws IOException, BundleException {
Storage storage = new Storage(container);
@@ -96,7 +96,7 @@ public class Storage {
mruList = new MRUBundleFileList(getBundleFileLimit(container.getConfiguration()));
equinoxContainer = container;
extensionInstaller = new FrameworkExtensionInstaller(container.getConfiguration());
- tolerateProvideEE = Boolean.parseBoolean(container.getConfiguration().getConfiguration(EquinoxConfiguration.PROP_TOLERATE_PROVIDE));
+ allowRestrictedProvides = Boolean.parseBoolean(container.getConfiguration().getConfiguration(EquinoxConfiguration.PROP_TOLERATE_PROVIDE));
// we need to set the install path as soon as possible so we can determine
// the absolute location of install relative URLs
@@ -584,7 +584,7 @@ public class Storage {
}
}
if (generation.getBundleInfo().getBundleId() != 0) {
- ModuleRevisionBuilder builder = tolerateProvideEE ? OSGiManifestBuilderFactory.createBuilder(mapHeaders, null, null, "") : OSGiManifestBuilderFactory.createBuilder(mapHeaders); //$NON-NLS-1$
+ ModuleRevisionBuilder builder = allowRestrictedProvides ? OSGiManifestBuilderFactory.createBuilder(mapHeaders, null, null, "") : OSGiManifestBuilderFactory.createBuilder(mapHeaders); //$NON-NLS-1$
if ((builder.getTypes() & BundleRevision.TYPE_FRAGMENT) != 0) {
for (ModuleRevisionBuilder.GenericInfo reqInfo : builder.getRequirements()) {
if (HostNamespace.HOST_NAMESPACE.equals(reqInfo.getNamespace())) {

Back to the top