felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r953480 - in /felix/sandbox/rickhall/framework-vb-2/src/main/java/org/apache/felix/framework: AbstractModuleImpl.java BundleImpl.java Felix.java FelixResolverState.java
Date Thu, 10 Jun 2010 22:25:12 GMT
Author: rickhall
Date: Thu Jun 10 22:25:12 2010
New Revision: 953480

URL: http://svn.apache.org/viewvc?rev=953480&view=rev
Log:
Merge branch 'vb'

Conflicts:
	src/main/java/org/apache/felix/framework/AbstractModuleImpl.java
	src/main/java/org/apache/felix/framework/Felix.java
	src/main/java/org/apache/felix/framework/FelixResolverState.java

Modified:
    felix/sandbox/rickhall/framework-vb-2/src/main/java/org/apache/felix/framework/AbstractModuleImpl.java
    felix/sandbox/rickhall/framework-vb-2/src/main/java/org/apache/felix/framework/BundleImpl.java
    felix/sandbox/rickhall/framework-vb-2/src/main/java/org/apache/felix/framework/Felix.java
    felix/sandbox/rickhall/framework-vb-2/src/main/java/org/apache/felix/framework/FelixResolverState.java

Modified: felix/sandbox/rickhall/framework-vb-2/src/main/java/org/apache/felix/framework/AbstractModuleImpl.java
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/framework-vb-2/src/main/java/org/apache/felix/framework/AbstractModuleImpl.java?rev=953480&r1=953479&r2=953480&view=diff
==============================================================================
--- felix/sandbox/rickhall/framework-vb-2/src/main/java/org/apache/felix/framework/AbstractModuleImpl.java
(original)
+++ felix/sandbox/rickhall/framework-vb-2/src/main/java/org/apache/felix/framework/AbstractModuleImpl.java
Thu Jun 10 22:25:12 2010
@@ -208,11 +208,19 @@ abstract class AbstractModuleImpl implem
         {
             if (((Wire) m_wires.get(i)).getCapability().getNamespace().equals(Capability.MODULE_NAMESPACE))
             {
+<<<<<<< HEAD
                 ((ModuleImpl) ((Wire) m_wires.get(i)).getExporter()).removeDependentRequirer(this);
             }
             else if (((Wire) m_wires.get(i)).getCapability().getNamespace().equals(Capability.PACKAGE_NAMESPACE))
             {
                 ((ModuleImpl) ((Wire) m_wires.get(i)).getExporter()).removeDependentImporter(this);
+=======
+                ((AbstractModuleImpl) ((Wire) m_wires.get(i)).getExporter()).removeDependentRequirer(this);
+            }
+            else if (((Wire) m_wires.get(i)).getCapability().getNamespace().equals(Capability.PACKAGE_NAMESPACE))
+            {
+                ((AbstractModuleImpl) ((Wire) m_wires.get(i)).getExporter()).removeDependentImporter(this);
+>>>>>>> vb
             }
         }
 
@@ -223,11 +231,19 @@ abstract class AbstractModuleImpl implem
         {
             if (((Wire) m_wires.get(i)).getCapability().getNamespace().equals(Capability.MODULE_NAMESPACE))
             {
+<<<<<<< HEAD
                 ((ModuleImpl) ((Wire) m_wires.get(i)).getExporter()).addDependentRequirer(this);
             }
             else if (((Wire) m_wires.get(i)).getCapability().getNamespace().equals(Capability.PACKAGE_NAMESPACE))
             {
                 ((ModuleImpl) ((Wire) m_wires.get(i)).getExporter()).addDependentImporter(this);
+=======
+                ((AbstractModuleImpl) ((Wire) m_wires.get(i)).getExporter()).addDependentRequirer(this);
+            }
+            else if (((Wire) m_wires.get(i)).getCapability().getNamespace().equals(Capability.PACKAGE_NAMESPACE))
+            {
+                ((AbstractModuleImpl) ((Wire) m_wires.get(i)).getExporter()).addDependentImporter(this);
+>>>>>>> vb
             }
         }
     }

Modified: felix/sandbox/rickhall/framework-vb-2/src/main/java/org/apache/felix/framework/BundleImpl.java
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/framework-vb-2/src/main/java/org/apache/felix/framework/BundleImpl.java?rev=953480&r1=953479&r2=953480&view=diff
==============================================================================
--- felix/sandbox/rickhall/framework-vb-2/src/main/java/org/apache/felix/framework/BundleImpl.java
(original)
+++ felix/sandbox/rickhall/framework-vb-2/src/main/java/org/apache/felix/framework/BundleImpl.java
Thu Jun 10 22:25:12 2010
@@ -131,7 +131,10 @@ class BundleImpl implements Bundle
         for (int i = 0; i < m_modules.size(); i++)
         {
             getFramework().getResolverState().removeModule(m_modules.get(i));
-            ((ModuleImpl) m_modules.get(i)).close();
+            if (m_modules.get(i) instanceof ModuleImpl)
+            {
+                ((ModuleImpl) m_modules.get(i)).close();
+            }
         }
     }
 

Modified: felix/sandbox/rickhall/framework-vb-2/src/main/java/org/apache/felix/framework/Felix.java
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/framework-vb-2/src/main/java/org/apache/felix/framework/Felix.java?rev=953480&r1=953479&r2=953480&view=diff
==============================================================================
--- felix/sandbox/rickhall/framework-vb-2/src/main/java/org/apache/felix/framework/Felix.java
(original)
+++ felix/sandbox/rickhall/framework-vb-2/src/main/java/org/apache/felix/framework/Felix.java
Thu Jun 10 22:25:12 2010
@@ -3426,7 +3426,7 @@ ex.printStackTrace();
         List<Module> modules = exporter.getModules();
         for (int modIdx = 0; modIdx < modules.size(); modIdx++)
         {
-            List<Module> dependents = ((ModuleImpl) modules.get(modIdx)).getDependents();
+            List<Module> dependents = ((AbstractModuleImpl) modules.get(modIdx)).getDependents();
             for (int depIdx = 0;
                 (dependents != null) && (depIdx < dependents.size());
                 depIdx++)
@@ -3453,7 +3453,8 @@ ex.printStackTrace();
         {
             // Include any importers that have wires to the specific
             // exported package.
-            List<Module> dependents = ((ModuleImpl) expModules.get(expIdx)).getDependentImporters();
+            List<Module> dependents =
+                ((AbstractModuleImpl) expModules.get(expIdx)).getDependentImporters();
             for (int depIdx = 0; (dependents != null) && (depIdx < dependents.size());
depIdx++)
             {
                 List<? extends VBWire> wires = dependents.get(depIdx).getWires();
@@ -3466,7 +3467,8 @@ ex.printStackTrace();
                     }
                 }
             }
-            dependents = ((ModuleImpl) expModules.get(expIdx)).getDependentRequirers();
+            dependents =
+                ((AbstractModuleImpl) expModules.get(expIdx)).getDependentRequirers();
             for (int depIdx = 0; (dependents != null) && (depIdx < dependents.size());
depIdx++)
             {
                 list.add(dependents.get(depIdx).getBundle());
@@ -3558,7 +3560,7 @@ ex.printStackTrace();
         {
             if (ex.getModule() != null)
             {
-                Bundle b = ((ModuleImpl) ex.getModule()).getBundle();
+                Bundle b = ((AbstractModuleImpl) ex.getModule()).getBundle();
                 throw new BundleException(
                     "Unresolved constraint in bundle " + b + ": "
                     + ((ex.getRequirement() == null)
@@ -4238,7 +4240,11 @@ ex.printStackTrace();
                                 wires = new ArrayList<VBWire>(wires.size() + 1);
                                 wires.addAll(module.getWires());
                                 wires.add(candidateWire);
+<<<<<<< HEAD
                                 ((ModuleImpl) module).resolve(wires);
+=======
+                                ((AbstractModuleImpl) module).resolve(wires);
+>>>>>>> vb
 m_logger.log(Logger.LOG_DEBUG, "DYNAMIC WIRE: " + wires.get(wires.size() - 1));
                             }
                         }

Modified: felix/sandbox/rickhall/framework-vb-2/src/main/java/org/apache/felix/framework/FelixResolverState.java
URL: http://svn.apache.org/viewvc/felix/sandbox/rickhall/framework-vb-2/src/main/java/org/apache/felix/framework/FelixResolverState.java?rev=953480&r1=953479&r2=953480&view=diff
==============================================================================
--- felix/sandbox/rickhall/framework-vb-2/src/main/java/org/apache/felix/framework/FelixResolverState.java
(original)
+++ felix/sandbox/rickhall/framework-vb-2/src/main/java/org/apache/felix/framework/FelixResolverState.java
Thu Jun 10 22:25:12 2010
@@ -534,14 +534,29 @@ public class FelixResolverState implemen
 
         // Set fragments to null, which will remove the module from all
         // of its dependent fragment modules.
+        if (host instanceof ModuleImpl)
+        {
+            try
+            {
+                ((ModuleImpl) host).attachFragments(null);
+            }
+            catch (Exception ex)
+            {
+                m_logger.log(Logger.LOG_ERROR, "Error detaching fragments.", ex);
+            }
+        }
+
+        // Set wires to null, which will remove the module from all
+        // of its dependent modules.
         try
         {
-            ((ModuleImpl) host).attachFragments(null);
+            ((AbstractModuleImpl) host).resolve(null);
         }
-        catch (Exception ex)
+        catch (BundleException ex)
         {
-            m_logger.log(Logger.LOG_ERROR, "Error detaching fragments.", ex);
+            // Shouldn't happen.
         }
+<<<<<<< HEAD
         // Set wires to null, which will remove the module from all
         // of its dependent modules.
         try
@@ -552,6 +567,8 @@ public class FelixResolverState implemen
         {
             // Shouldn't happen.
         }
+=======
+>>>>>>> vb
     }
 
     private List<Module> getMatchingFragments(Module host)



Mime
View raw message