[FELIX-4353] Remove special BREE checking

BREE checking is now done through generic capabilities and requirements, as required by the Core R5 spec (see commit r1560317). Therefore the special BREE checking code can be removed, which is what this commit does.


git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1563091 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/src/main/java/org/apache/felix/framework/ResolveContextImpl.java b/framework/src/main/java/org/apache/felix/framework/ResolveContextImpl.java
index 6d2b69d..393dabf 100644
--- a/framework/src/main/java/org/apache/felix/framework/ResolveContextImpl.java
+++ b/framework/src/main/java/org/apache/felix/framework/ResolveContextImpl.java
@@ -23,6 +23,7 @@
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
+
 import org.apache.felix.framework.StatefulResolver.ResolverHookRecord;
 import org.apache.felix.framework.resolver.CandidateComparator;
 import org.apache.felix.framework.resolver.HostedCapability;
@@ -102,11 +103,6 @@
         return m_wirings;
     }
 
-    public void checkExecutionEnvironment(BundleRevision rev) throws ResolveException
-    {
-        m_state.checkExecutionEnvironment(rev);
-    }
-
     public void checkNativeLibraries(BundleRevision rev) throws ResolveException
     {
         m_state.checkNativeLibraries(rev);
diff --git a/framework/src/main/java/org/apache/felix/framework/StatefulResolver.java b/framework/src/main/java/org/apache/felix/framework/StatefulResolver.java
index 90522f7..6c6e75f 100644
--- a/framework/src/main/java/org/apache/felix/framework/StatefulResolver.java
+++ b/framework/src/main/java/org/apache/felix/framework/StatefulResolver.java
@@ -1471,41 +1471,6 @@
         return fragments;
     }
 
-    void checkExecutionEnvironment(BundleRevision revision) throws ResolveException
-    {
-        String bundleExecEnvStr = (String)
-            ((BundleRevisionImpl) revision).getHeaders().get(
-                Constants.BUNDLE_REQUIREDEXECUTIONENVIRONMENT);
-        if (bundleExecEnvStr != null)
-        {
-            bundleExecEnvStr = bundleExecEnvStr.trim();
-
-            // If the bundle has specified an execution environment and the
-            // framework has an execution environment specified, then we must
-            // check for a match.
-            if (!bundleExecEnvStr.equals("")
-                && (m_fwkExecEnvStr != null)
-                && (m_fwkExecEnvStr.length() > 0))
-            {
-                StringTokenizer tokens = new StringTokenizer(bundleExecEnvStr, ",");
-                boolean found = false;
-                while (tokens.hasMoreTokens() && !found)
-                {
-                    if (m_fwkExecEnvSet.contains(tokens.nextToken().trim()))
-                    {
-                        found = true;
-                    }
-                }
-                if (!found)
-                {
-                    throw new ResolveException(
-                        "Execution environment not supported: "
-                        + bundleExecEnvStr, revision, null);
-                }
-            }
-        }
-    }
-
     void checkNativeLibraries(BundleRevision revision) throws ResolveException
     {
         // Next, try to resolve any native code, since the revision is
diff --git a/framework/src/main/java/org/apache/felix/framework/resolver/Candidates.java b/framework/src/main/java/org/apache/felix/framework/resolver/Candidates.java
index 1d8722a..9f57f95 100644
--- a/framework/src/main/java/org/apache/felix/framework/resolver/Candidates.java
+++ b/framework/src/main/java/org/apache/felix/framework/resolver/Candidates.java
@@ -28,6 +28,7 @@
 import java.util.Map.Entry;
 import java.util.Set;
 import java.util.TreeMap;
+
 import org.apache.felix.framework.ResolveContextImpl;
 import org.apache.felix.framework.util.FelixConstants;
 import org.apache.felix.framework.util.Util;
@@ -229,9 +230,6 @@
         // do some one-time checks and initialization.
         if ((remainingReqs == null) && (localCandidateMap == null))
         {
-            // Verify that any required execution environment is satisfied.
-            ((ResolveContextImpl) rc).checkExecutionEnvironment(revision);
-
             // Verify that any native libraries match the current platform.
             ((ResolveContextImpl) rc).checkNativeLibraries(revision);
 
@@ -357,8 +355,6 @@
         // If there are populates host candidates, then finish up
         // some other checks and prepopulate the result cache with
         // the work we've done so far.
-        // Verify that any required execution environment is satisfied.
-        ((ResolveContextImpl) rc).checkExecutionEnvironment(revision);
         // Verify that any native libraries match the current platform.
         ((ResolveContextImpl) rc).checkNativeLibraries(revision);
         // Record cycle count, but start at -1 since it will