directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1226377 - /directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/filtering/BaseEntryFilteringCursor.java
Date Mon, 02 Jan 2012 09:03:18 GMT
Author: elecharny
Date: Mon Jan  2 09:03:17 2012
New Revision: 1226377

URL: http://svn.apache.org/viewvc?rev=1226377&view=rev
Log:
Fixed a NPE

Modified:
    directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/filtering/BaseEntryFilteringCursor.java

Modified: directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/filtering/BaseEntryFilteringCursor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/filtering/BaseEntryFilteringCursor.java?rev=1226377&r1=1226376&r2=1226377&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/filtering/BaseEntryFilteringCursor.java
(original)
+++ directory/apacheds/branches/apacheds-txns/core-api/src/main/java/org/apache/directory/server/core/api/filtering/BaseEntryFilteringCursor.java
Mon Jan  2 09:03:17 2012
@@ -450,7 +450,12 @@ public class BaseEntryFilteringCursor ex
         Entry tempResult = null;
 
         // Switch the current transaction
-        TxnHandle previousTxn = txnManager.setCurTxn( transaction );
+        TxnHandle previousTxn = null;
+
+        if ( txnManager != null )
+        {
+            previousTxn = txnManager.setCurTxn( transaction );
+        }
 
         try
         {
@@ -513,7 +518,10 @@ public class BaseEntryFilteringCursor ex
         finally
         {
             // Switch back the previous transaction
-            txnManager.setCurTxn( previousTxn );
+            if ( txnManager != null )
+            {
+                txnManager.setCurTxn( previousTxn );
+            }
         }
 
         prefetched = null;



Mime
View raw message