felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r423472 - /incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/Felix.java
Date Wed, 19 Jul 2006 14:37:45 GMT
Author: rickhall
Date: Wed Jul 19 07:37:45 2006
New Revision: 423472

URL: http://svn.apache.org/viewvc?rev=423472&view=rev
Log:
Felix was interpreting the spec such that bundles did not import from
themselves, but it appears that PackageAdmin should consider a bundle
that both exports and imports a package as being an importer of the
package even if it is selected as the exporter of the package. Previously,
Felix has been filtering out this scenario.

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

Modified: incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/Felix.java
URL: http://svn.apache.org/viewvc/incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/Felix.java?rev=423472&r1=423471&r2=423472&view=diff
==============================================================================
--- incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/Felix.java
(original)
+++ incubator/felix/trunk/org.apache.felix.framework/src/main/java/org/apache/felix/framework/Felix.java
Wed Jul 19 07:37:45 2006
@@ -2680,24 +2680,20 @@
         {
             BundleImpl importer = (BundleImpl) bundles[bundleIdx];
 
-            // Ignore the bundle if it imports from itself.
-            if (exporter != importer)
+            // Check the import wires of all modules for all bundles.
+            IModule[] modules = importer.getInfo().getModules();
+            for (int modIdx = 0; modIdx < modules.length; modIdx++)
             {
-                // Check the import wires of all modules for all bundles.
-                IModule[] modules = importer.getInfo().getModules();
-                for (int modIdx = 0; modIdx < modules.length; modIdx++)
+                R4Wire wire = Util.getWire(modules[modIdx], ep.getName());
+
+                // If the resolving module is associated with the
+                // exporting bundle, then add current bundle to
+                // import list.
+                if ((wire != null) && exporterInfo.hasModule(wire.getExportingModule()))
                 {
-                    R4Wire wire = Util.getWire(modules[modIdx], ep.getName());
-    
-                    // If the resolving module is associated with the
-                    // exporting bundle, then add current bundle to
-                    // import list.
-                    if ((wire != null) && exporterInfo.hasModule(wire.getExportingModule()))
-                    {
-                        // Add the bundle to the list of importers.
-                        list.add(bundles[bundleIdx]);
-                        break;
-                    }
+                    // Add the bundle to the list of importers.
+                    list.add(bundles[bundleIdx]);
+                    break;
                 }
             }
         }



Mime
View raw message