geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ke...@apache.org
Subject svn commit: r528998 - /geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystemGBean.java
Date Sun, 15 Apr 2007 16:09:24 GMT
Author: kevan
Date: Sun Apr 15 09:09:24 2007
New Revision: 528998

URL: http://svn.apache.org/viewvc?view=rev&rev=528998
Log:
Avoid potential NullPointerException on rar undeploy

Modified:
    geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystemGBean.java

Modified: geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystemGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystemGBean.java?view=diff&rev=528998&r1=528997&r2=528998
==============================================================================
--- geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystemGBean.java
(original)
+++ geronimo/server/trunk/modules/geronimo-openejb/src/main/java/org/apache/geronimo/openejb/OpenEjbSystemGBean.java
Sun Apr 15 09:09:24 2007
@@ -238,13 +238,15 @@
     }
 
     private void removeResourceAdapter(ResourceAdapterWrapper resourceAdapterWrapper) {
-        for (String messageListenerInterface : resourceAdapterWrapper.getMessageListenerToActivationSpecMap().keySet())
{
-            String containerName = getResourceAdapterId(resourceAdapterWrapper) + "-" + messageListenerInterface;
-            processedResourceAdapterWrappers.remove(containerName);
-            assembler.removeContainer(containerName);
+        Map<String, String> listenerToActivationSpecMap = resourceAdapterWrapper.getMessageListenerToActivationSpecMap();
+        if (listenerToActivationSpecMap != null) {
+            for (String messageListenerInterface : listenerToActivationSpecMap.keySet())
{
+                String containerName = getResourceAdapterId(resourceAdapterWrapper) + "-"
+ messageListenerInterface;
+                processedResourceAdapterWrappers.remove(containerName);
+                assembler.removeContainer(containerName);
+            }
+            registeredResouceAdapters.remove(resourceAdapterWrapper.getName());
         }
-
-        registeredResouceAdapters.remove(resourceAdapterWrapper.getName());
     }
 
     private String getResourceAdapterId(ResourceAdapterWrapper resourceAdapterWrapper) {



Mime
View raw message