geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r1001148 - /geronimo/components/txmanager/trunk/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/RecoverTask.java
Date Sat, 25 Sep 2010 06:52:04 GMT
Author: djencks
Date: Sat Sep 25 06:52:04 2010
New Revision: 1001148

URL: http://svn.apache.org/viewvc?rev=1001148&view=rev
Log:
This NPE fix never got ported from the 2.2 branch

Modified:
    geronimo/components/txmanager/trunk/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/RecoverTask.java

Modified: geronimo/components/txmanager/trunk/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/RecoverTask.java
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/trunk/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/RecoverTask.java?rev=1001148&r1=1001147&r2=1001148&view=diff
==============================================================================
--- geronimo/components/txmanager/trunk/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/RecoverTask.java
(original)
+++ geronimo/components/txmanager/trunk/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/RecoverTask.java
Sat Sep 25 06:52:04 2010
@@ -47,10 +47,12 @@ public class RecoverTask implements Runn
     public void run() {
         try {
             NamedXAResource namedXAResource = namedXAResourceFactory.getNamedXAResource();
-            try {
-                recovery.recoverResourceManager(namedXAResource);
-            } finally {
-                namedXAResourceFactory.returnNamedXAResource(namedXAResource);
+            if (namedXAResource != null) {
+                try {
+                    recovery.recoverResourceManager(namedXAResource);
+                } finally {
+                    namedXAResourceFactory.returnNamedXAResource(namedXAResource);
+                }
             }
             return;
         } catch (XAException e) {



Mime
View raw message