felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pde...@apache.org
Subject svn commit: r1604248 - /felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm/src/org/apache/felix/dm/impl/DependencyImpl.java
Date Fri, 20 Jun 2014 19:04:35 GMT
Author: pderop
Date: Fri Jun 20 19:04:34 2014
New Revision: 1604248

URL: http://svn.apache.org/r1604248
Log:
Store the bundle which is defining a service dependency in the Dependency class, so we can
pass it to the ServiceEventImpl constructor.
Don't pass anymore any parameters to the Event.close() method.

Modified:
    felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm/src/org/apache/felix/dm/impl/DependencyImpl.java

Modified: felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm/src/org/apache/felix/dm/impl/DependencyImpl.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm/src/org/apache/felix/dm/impl/DependencyImpl.java?rev=1604248&r1=1604247&r2=1604248&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm/src/org/apache/felix/dm/impl/DependencyImpl.java
(original)
+++ felix/sandbox/pderop/dependencymanager-prototype/org.apache.felix.dm/src/org/apache/felix/dm/impl/DependencyImpl.java
Fri Jun 20 19:04:34 2014
@@ -25,6 +25,7 @@ import org.apache.felix.dm.Dependency;
 import org.apache.felix.dm.context.ComponentContext;
 import org.apache.felix.dm.context.DependencyContext;
 import org.apache.felix.dm.context.Event;
+import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 
 public class DependencyImpl<T extends Dependency> implements Dependency, DependencyContext
{
@@ -44,6 +45,7 @@ public class DependencyImpl<T extends De
     protected volatile Object m_propagateCallbackInstance;
     protected volatile String m_propagateCallbackMethod;
     protected final BundleContext m_context;
+    protected final Bundle m_bundle;
 
 	public DependencyImpl() {	
         this(true, null);
@@ -52,6 +54,7 @@ public class DependencyImpl<T extends De
 	public DependencyImpl(boolean autoConfig, BundleContext bc) {	
         m_autoConfig = autoConfig;
         m_context = bc;
+        m_bundle = m_context != null ? m_context.getBundle() : null;
 	}
 	
 	public DependencyImpl(DependencyImpl<T> prototype) {
@@ -69,6 +72,7 @@ public class DependencyImpl<T extends De
         m_propagateCallbackInstance = prototype.m_propagateCallbackInstance;
         m_propagateCallbackMethod = prototype.m_propagateCallbackMethod;
         m_context = prototype.m_context;
+        m_bundle = prototype.m_bundle;
 	}
 	
 	public void add(final Event e) {
@@ -105,7 +109,7 @@ public class DependencyImpl<T extends De
 			    try {
 			        m_component.handleRemoved(DependencyImpl.this, e);	
 			    } finally {
-			        e.close(m_context);
+			        e.close();
 			    }
 			}
 		});
@@ -121,7 +125,7 @@ public class DependencyImpl<T extends De
                 try {
                     m_component.handleSwapped(DependencyImpl.this, event, newEvent);  
                 } finally {
-                    event.close(m_context);
+                    event.close();
                 }
             }
         });



Mime
View raw message