geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ke...@apache.org
Subject svn commit: r987164 - /geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/ActivationSpecNamedXAResourceFactory.java
Date Thu, 19 Aug 2010 14:44:18 GMT
Author: kevan
Date: Thu Aug 19 14:44:18 2010
New Revision: 987164

URL: http://svn.apache.org/viewvc?rev=987164&view=rev
Log:
GERONIMO-5152 fix potential NPE, if a null xaResource is returned

Modified:
    geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/ActivationSpecNamedXAResourceFactory.java

Modified: geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/ActivationSpecNamedXAResourceFactory.java
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/ActivationSpecNamedXAResourceFactory.java?rev=987164&r1=987163&r2=987164&view=diff
==============================================================================
--- geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/ActivationSpecNamedXAResourceFactory.java
(original)
+++ geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1/geronimo-connector/src/main/java/org/apache/geronimo/connector/ActivationSpecNamedXAResourceFactory.java
Thu Aug 19 14:44:18 2010
@@ -51,7 +51,7 @@ public class ActivationSpecNamedXAResour
     public NamedXAResource getNamedXAResource() throws SystemException {
         try {
             XAResource[] xaResources = resourceAdapter.getXAResources(new ActivationSpec[]{activationSpec});
-            if (xaResources == null || xaResources.length == 0) {
+            if (xaResources == null || xaResources.length == 0 || xaResources[0] == null)
{
                 return null;
             }
             return new WrapperNamedXAResource(xaResources[0], name);



Mime
View raw message