felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r1176962 - /felix/trunk/framework/src/main/java/org/apache/felix/framework/StatefulResolver.java
Date Wed, 28 Sep 2011 17:04:05 GMT
Author: rickhall
Date: Wed Sep 28 17:04:05 2011
New Revision: 1176962

URL: http://svn.apache.org/viewvc?rev=1176962&view=rev
Log:
Make sure capabilities from resolved singleton bundles are properly
indexed. (FELIX-3137)

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

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=1176962&r1=1176961&r2=1176962&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 Wed
Sep 28 17:04:05 2011
@@ -928,12 +928,19 @@ class StatefulResolver
 
             m_revisions.add(br);
 
-            if (Util.isSingleton(br))
+            // Add singletons to the singleton map.
+            boolean isSingleton = Util.isSingleton(br);
+            if (isSingleton)
             {
                 // Index the new singleton.
                 addToSingletonMap(m_singletons, br);
             }
-            else
+
+            // We always need to index non-singleton bundle capabilities, but
+            // singleton bundles only need to be index if they are resolved.
+            // Unresolved singleton capabilities are only indexed before a
+            // resolve operation when singleton selection is performed.
+            if (!isSingleton || (br.getWiring() != null))
             {
                 if (Util.isFragment(br))
                 {



Mime
View raw message