geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ke...@apache.org
Subject svn commit: r518034 - /geronimo/server/trunk/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
Date Wed, 14 Mar 2007 06:15:55 GMT
Author: kevan
Date: Tue Mar 13 23:15:54 2007
New Revision: 518034

URL: http://svn.apache.org/viewvc?view=rev&rev=518034
Log:
Fix potential NPE in ConnectorModuleBuilder. Need to guard against potentially non-existent
elements...

Modified:
    geronimo/server/trunk/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java

Modified: geronimo/server/trunk/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java?view=diff&rev=518034&r1=518033&r2=518034
==============================================================================
--- geronimo/server/trunk/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
Tue Mar 13 23:15:54 2007
@@ -421,12 +421,14 @@
 
             // Add map from messageListenerInterface to activationSpec class
             Map<String,String> messageListenerToActivationSpecMap = new TreeMap<String,String>();
-            for (MessagelistenerType messagelistenerType : resourceadapter.getInboundResourceadapter().getMessageadapter().getMessagelistenerArray())
{
-                String messageListenerInterface = messagelistenerType.getMessagelistenerType().getStringValue().trim();
-                ActivationspecType activationspec = messagelistenerType.getActivationspec();
-                String activationSpecClassName = activationspec.getActivationspecClass().getStringValue().trim();
-                messageListenerToActivationSpecMap.put(messageListenerInterface, activationSpecClassName);
-                resourceAdapterGBeanData.setAttribute("messageListenerToActivationSpecMap",
messageListenerToActivationSpecMap);
+            if (resourceadapter.isSetInboundResourceadapter() && resourceadapter.getInboundResourceadapter().isSetMessageadapter())
{
+                for (MessagelistenerType messagelistenerType : resourceadapter.getInboundResourceadapter().getMessageadapter().getMessagelistenerArray())
{
+                    String messageListenerInterface = messagelistenerType.getMessagelistenerType().getStringValue().trim();
+                    ActivationspecType activationspec = messagelistenerType.getActivationspec();
+                    String activationSpecClassName = activationspec.getActivationspecClass().getStringValue().trim();
+                    messageListenerToActivationSpecMap.put(messageListenerInterface, activationSpecClassName);
+                    resourceAdapterGBeanData.setAttribute("messageListenerToActivationSpecMap",
messageListenerToActivationSpecMap);
+                }
             }
 
             resourceAdapterModuleData.setAttribute("resourceAdapterGBeanData", resourceAdapterGBeanData);



Mime
View raw message