geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r171157 - /geronimo/trunk/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
Date Fri, 20 May 2005 21:18:21 GMT
Author: djencks
Date: Fri May 20 14:18:19 2005
New Revision: 171157

URL: http://svn.apache.org/viewcvs?rev=171157&view=rev
Log:
avoid NPE

Modified:
    geronimo/trunk/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java

Modified: geronimo/trunk/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java?rev=171157&r1=171156&r2=171157&view=diff
==============================================================================
--- geronimo/trunk/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
(original)
+++ geronimo/trunk/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
Fri May 20 14:18:19 2005
@@ -49,7 +49,6 @@
 import org.apache.geronimo.xbeans.geronimo.naming.GerEjbLocalRefType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerEjbRefType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerGbeanLocatorType;
-import org.apache.geronimo.xbeans.geronimo.naming.GerPortType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerResourceEnvRefType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerResourceRefType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerServiceRefType;
@@ -733,10 +732,12 @@
 
     private static Map mapServiceRefs(GerServiceRefType[] refs) {
         Map refMap = new HashMap();
-        for (int i = 0; i < refs.length; i++) {
-            GerServiceRefType ref = refs[i];
-            String serviceRefName = ref.getServiceRefName().trim();
-            refMap.put(serviceRefName, ref);
+        if (refs != null) {
+            for (int i = 0; i < refs.length; i++) {
+                GerServiceRefType ref = refs[i];
+                String serviceRefName = ref.getServiceRefName().trim();
+                refMap.put(serviceRefName, ref);
+            }
         }
         return refMap;
     }



Mime
View raw message