Author: davidb
Date: Fri Jan 31 08:57:11 2014
New Revision: 1563091

URL: http://svn.apache.org/r1563091
Log:
[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.

Modified:
    
felix/trunk/framework/src/main/java/org/apache/felix/framework/ResolveContextImpl.java
    
felix/trunk/framework/src/main/java/org/apache/felix/framework/StatefulResolver.java
    
felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/Candidates.java

Modified: 
felix/trunk/framework/src/main/java/org/apache/felix/framework/ResolveContextImpl.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/ResolveContextImpl.java?rev=1563091&r1=1563090&r2=1563091&view=diff
==============================================================================
--- 
felix/trunk/framework/src/main/java/org/apache/felix/framework/ResolveContextImpl.java
 (original)
+++ 
felix/trunk/framework/src/main/java/org/apache/felix/framework/ResolveContextImpl.java
 Fri Jan 31 08:57:11 2014
@@ -23,6 +23,7 @@ import java.util.Collection;
 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 @@ public class ResolveContextImpl extends 
         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);

Modified: 
felix/trunk/framework/src/main/java/org/apache/felix/framework/StatefulResolver.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/StatefulResolver.java?rev=1563091&r1=1563090&r2=1563091&view=diff
==============================================================================
--- 
felix/trunk/framework/src/main/java/org/apache/felix/framework/StatefulResolver.java
 (original)
+++ 
felix/trunk/framework/src/main/java/org/apache/felix/framework/StatefulResolver.java
 Fri Jan 31 08:57:11 2014
@@ -1471,41 +1471,6 @@ class StatefulResolver
         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

Modified: 
felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/Candidates.java
URL: 
http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/Candidates.java?rev=1563091&r1=1563090&r2=1563091&view=diff
==============================================================================
--- 
felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/Candidates.java
 (original)
+++ 
felix/trunk/framework/src/main/java/org/apache/felix/framework/resolver/Candidates.java
 Fri Jan 31 08:57:11 2014
@@ -28,6 +28,7 @@ import java.util.Map;
 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 @@ class Candidates
         // 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 @@ class Candidates
         // 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


Reply via email to