You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by dj...@apache.org on 2013/10/23 23:00:27 UTC

svn commit: r1535180 - /felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java

Author: djencks
Date: Wed Oct 23 21:00:27 2013
New Revision: 1535180

URL: http://svn.apache.org/r1535180
Log:
FELIX-4171 Always install the open latch when opening a dependency manager, and don't duplicate the satisfied check.

Modified:
    felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java

Modified: felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java?rev=1535180&r1=1535179&r2=1535180&view=diff
==============================================================================
--- felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java (original)
+++ felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java Wed Oct 23 21:00:27 2013
@@ -1402,23 +1402,6 @@ public class DependencyManager<S, T> imp
      */
     boolean open( S componentInstance, EdgeInfo edgeInfo )
     {
-        // If no references were received, we have to check if the dependency
-        // is optional, if it is not then the dependency is invalid
-        if ( !isSatisfied() )
-        {
-            m_componentManager.log( LogService.LOG_DEBUG,
-                "For dependency {0}, no longer satisfied, bind fails",
-                new Object[]{ getName() }, null );
-            return false;
-        }
-
-        // if no bind method is configured or if this is a delayed component,
-        // we have nothing to do and just signal success
-        if ( componentInstance == null || m_dependencyMetadata.getBind() == null )
-        {
-            return true;
-        }
-
         // assume success to begin with: if the dependency is optional,
         // we don't care, whether we can bind a service. Otherwise, we
         // require at least one service to be bound, thus we require