incubator-aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mnutt...@apache.org
Subject svn commit: r1049086 - /incubator/aries/trunk/jndi/jndi-url/src/main/java/org/apache/aries/jndi/url/BlueprintURLContext.java
Date Tue, 14 Dec 2010 13:48:25 GMT
Author: mnuttall
Date: Tue Dec 14 13:48:25 2010
New Revision: 1049086

URL: http://svn.apache.org/viewvc?rev=1049086&view=rev
Log:
ARIES-512: Add web itest

Modified:
    incubator/aries/trunk/jndi/jndi-url/src/main/java/org/apache/aries/jndi/url/BlueprintURLContext.java

Modified: incubator/aries/trunk/jndi/jndi-url/src/main/java/org/apache/aries/jndi/url/BlueprintURLContext.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/jndi/jndi-url/src/main/java/org/apache/aries/jndi/url/BlueprintURLContext.java?rev=1049086&r1=1049085&r2=1049086&view=diff
==============================================================================
--- incubator/aries/trunk/jndi/jndi-url/src/main/java/org/apache/aries/jndi/url/BlueprintURLContext.java
(original)
+++ incubator/aries/trunk/jndi/jndi-url/src/main/java/org/apache/aries/jndi/url/BlueprintURLContext.java
Tue Dec 14 13:48:25 2010
@@ -382,15 +382,17 @@ public class BlueprintURLContext impleme
   {
     ServiceReference[] refs = b.getRegisteredServices();
     ServiceReference result = null;
-    outer: for (ServiceReference r : refs) { 
-      String[] objectClasses = (String[]) r.getProperty(Constants.OBJECTCLASS);
-      for (String objectClass : objectClasses) { 
-        if (objectClass.equals(BlueprintContainer.class.getName())) { 
-          // Arguably we could put an r.isAssignableTo(jndi-url-bundle, BlueprintContainer.class.getName())

-          // check here. But if you've got multiple, class-space inconsistent instances of
blueprint in 
-          // your environment, you've almost certainly got other problems. 
-          result = r;
-          break outer;
+    if (refs != null) { 
+      outer: for (ServiceReference r : refs) { 
+        String[] objectClasses = (String[]) r.getProperty(Constants.OBJECTCLASS);
+        for (String objectClass : objectClasses) { 
+          if (objectClass.equals(BlueprintContainer.class.getName())) { 
+            // Arguably we could put an r.isAssignableTo(jndi-url-bundle, BlueprintContainer.class.getName())

+            // check here. But if you've got multiple, class-space inconsistent instances
of blueprint in 
+            // your environment, you've almost certainly got other problems. 
+            result = r;
+            break outer;
+          }
         }
       }
     }



Mime
View raw message