felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r759040 - /felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java
Date Fri, 27 Mar 2009 07:25:31 GMT
Author: rickhall
Date: Fri Mar 27 07:25:29 2009
New Revision: 759040

URL: http://svn.apache.org/viewvc?rev=759040&view=rev
Log:
The importing bundles for an exported package were being calculated
incorrectly. (FELIX-1005)

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

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java?rev=759040&r1=759039&r2=759040&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java (original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java Fri Mar 27 07:25:29
2009
@@ -2975,10 +2975,20 @@
         IModule[] expModules = exporter.getModules();
         for (int expIdx = 0; (expModules != null) && (expIdx < expModules.length);
expIdx++)
         {
+            // Include any importers that have wires to the specific
+            // exported package.
             IModule[] dependents = ((ModuleImpl) expModules[expIdx]).getDependentImporters();
             for (int depIdx = 0; (dependents != null) && (depIdx < dependents.length);
depIdx++)
             {
-                list.add(dependents[depIdx].getBundle());
+                IWire[] wires = dependents[depIdx].getWires();
+                for (int wireIdx = 0; (wires != null) && (wireIdx < wires.length);
wireIdx++)
+                {
+                    if ((wires[wireIdx].getExporter() == expModules[expIdx])
+                        && (wires[wireIdx].hasPackage(ep.getName())))
+                    {
+                        list.add(dependents[depIdx].getBundle());
+                    }
+                }
             }
             dependents = ((ModuleImpl) expModules[expIdx]).getDependentRequirers();
             for (int depIdx = 0; (dependents != null) && (depIdx < dependents.length);
depIdx++)
@@ -4042,6 +4052,7 @@
 
         public void stop()
         {
+// TODO: LOCKING - This is not really correct.
             if (m_bundle.getState() == Bundle.ACTIVE)
             {
                 m_oldState = Bundle.ACTIVE;



Mime
View raw message