Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/builders/OSGiManifestBuilderFactory.java')
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/builders/OSGiManifestBuilderFactory.java15
1 files changed, 13 insertions, 2 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/builders/OSGiManifestBuilderFactory.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/builders/OSGiManifestBuilderFactory.java
index 2f3a39c04..0a5e705c5 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/builders/OSGiManifestBuilderFactory.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/container/builders/OSGiManifestBuilderFactory.java
@@ -189,8 +189,19 @@ public final class OSGiManifestBuilderFactory {
throw new BundleException(Msg.OSGiManifestBuilderFactory_ExtensionImportError, BundleException.MANIFEST_ERROR);
if (manifest.get(Constants.REQUIRE_BUNDLE) != null)
throw new BundleException(Msg.OSGiManifestBuilderFactory_ExtensionReqBundleError, BundleException.MANIFEST_ERROR);
- if (manifest.get(Constants.REQUIRE_CAPABILITY) != null)
- throw new BundleException(Msg.OSGiManifestBuilderFactory_ExtensionReqCapError, BundleException.MANIFEST_ERROR);
+ if (manifest.get(Constants.REQUIRE_CAPABILITY) != null) {
+ ManifestElement[] manifestElements = ManifestElement.parseHeader(Constants.REQUIRE_CAPABILITY, manifest.get(Constants.REQUIRE_CAPABILITY));
+ if (manifestElements != null) {
+ for (ManifestElement manifestElement : manifestElements) {
+ for (String value : manifestElement.getValueComponents()) {
+ if (!ExecutionEnvironmentNamespace.EXECUTION_ENVIRONMENT_NAMESPACE.equals(value)) {
+ throw new BundleException(NLS.bind(Msg.OSGiManifestBuilderFactory_ExtensionReqCapError, value), BundleException.MANIFEST_ERROR);
+ }
+ }
+ }
+ }
+
+ }
if (manifest.get(Constants.BUNDLE_NATIVECODE) != null)
throw new BundleException(Msg.OSGiManifestBuilderFactory_ExtensionNativeError, BundleException.MANIFEST_ERROR);

Back to the top