felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clem...@apache.org
Subject svn commit: r996286 - /felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/Dependency.java
Date Sun, 12 Sep 2010 10:20:00 GMT
Author: clement
Date: Sun Sep 12 10:20:00 2010
New Revision: 996286

URL: http://svn.apache.org/viewvc?rev=996286&view=rev
Log:
Try a first approach to fix FELIX-2596 DependencyHandler.onObjectCreation throws NPE when
bundle is refreshed.
If refs is null, exit immediately.

Modified:
    felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/Dependency.java

Modified: felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/Dependency.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/Dependency.java?rev=996286&r1=996285&r2=996286&view=diff
==============================================================================
--- felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/Dependency.java
(original)
+++ felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/handlers/dependency/Dependency.java
Sun Sep 12 10:20:00 2010
@@ -247,6 +247,13 @@ public class Dependency extends Dependen
             refs = getServiceReferences(); // Stack confinement.
         }
 
+        // This is a pretty strange case, but we don't have any service.
+        // This may happen during refresh.
+        // So we just return.
+        if (refs == null) {
+        	return;
+        }
+
         // Call bind callback.
         for (int j = 0; m_callbacks != null && j < m_callbacks.length; j++) {
// The array is constant.
             if (m_callbacks[j].getMethodType() == DependencyCallback.BIND) {



Mime
View raw message