FELIX-2385: Execution environment property is not correctly exposed
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@952615 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/LocalResourceImpl.java b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/LocalResourceImpl.java
index eadfa70..0abf109 100644
--- a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/LocalResourceImpl.java
+++ b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/impl/LocalResourceImpl.java
@@ -21,6 +21,7 @@
import java.util.Dictionary;
import java.util.HashSet;
import java.util.Set;
+import java.util.StringTokenizer;
import org.apache.felix.bundlerepository.Capability;
import org.osgi.framework.Bundle;
@@ -72,9 +73,12 @@
String ee = m_bundle.getBundleContext().getProperty(Constants.FRAMEWORK_EXECUTIONENVIRONMENT);
if (ee != null)
{
- CapabilityImpl cap = new CapabilityImpl(Capability.EXECUTIONENVIRONMENT);
- cap.addProperty(Capability.EXECUTIONENVIRONMENT, ee);
- addCapability(cap);
+ StringTokenizer tokens = new StringTokenizer(ee, ",");
+ while (tokens.hasMoreTokens()) {
+ CapabilityImpl cap = new CapabilityImpl(Capability.EXECUTIONENVIRONMENT);
+ cap.addProperty(Capability.EXECUTIONENVIRONMENT, tokens.nextToken().trim());
+ addCapability(cap);
+ }
}
/* TODO: OBR - Fix system capabilities.