felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r1458393 - /felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/DependencyManager.java
Date Tue, 19 Mar 2013 16:38:54 GMT
Author: djencks
Date: Tue Mar 19 16:38:54 2013
New Revision: 1458393

URL: http://svn.apache.org/r1458393
Log:
FELIX-3971 fix another NPE from ScrInfo when components are not active

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=1458393&r1=1458392&r2=1458393&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
Tue Mar 19 16:38:54 2013
@@ -180,7 +180,12 @@ public class DependencyManager<S, T> imp
 
         public boolean isSatisfied()
         {
-            return isOptional() || !getTracker().isEmpty();
+            if (isOptional())
+            {
+                return true;
+            }            
+            ServiceTracker<T, RefPair<T>> tracker = getTracker();
+            return !(tracker == null) && !tracker.isEmpty();
         }
 
         protected ServiceTracker<T, RefPair<T>> getTracker()



Mime
View raw message