aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r1383274 - /aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/ReferenceListRecipe.java
Date Tue, 11 Sep 2012 07:53:10 GMT
Author: gnodet
Date: Tue Sep 11 07:53:10 2012
New Revision: 1383274

URL: http://svn.apache.org/viewvc?rev=1383274&view=rev
Log:
[ARIES-923] A service proxy obtained from a reference list can return a null service, leading
to NPE

Modified:
    aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/ReferenceListRecipe.java

Modified: aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/ReferenceListRecipe.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/ReferenceListRecipe.java?rev=1383274&r1=1383273&r2=1383274&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/ReferenceListRecipe.java
(original)
+++ aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/ReferenceListRecipe.java
Tue Sep 11 07:53:10 2012
@@ -205,11 +205,11 @@ public class ReferenceListRecipe extends
         }
 
         public synchronized Object call() throws Exception {
-            if (reference == null) {
-                throw new ServiceUnavailableException("Service is unavailable", getOsgiFilter());
+            if (service == null && reference != null) {
+                service = getServiceSecurely(reference);
             }
             if (service == null) {
-                service = getServiceSecurely(reference);
+                throw new ServiceUnavailableException("Service is unavailable", getOsgiFilter());
             }
             return service;
         }



Mime
View raw message