jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r708619 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/LocalItemStateManager.java
Date Tue, 28 Oct 2008 17:48:40 GMT
Author: jukka
Date: Tue Oct 28 10:48:40 2008
New Revision: 708619

URL: http://svn.apache.org/viewvc?rev=708619&view=rev
Log:
JCR-1813: Invalid journal records during XATransactions

Avoid empty journal records by not executing updates when no changes are included.

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/LocalItemStateManager.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/LocalItemStateManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/LocalItemStateManager.java?rev=708619&r1=708618&r2=708619&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/LocalItemStateManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/LocalItemStateManager.java
Tue Oct 28 10:48:40 2008
@@ -307,8 +307,11 @@
         if (!editMode) {
             throw new IllegalStateException("Not in edit mode");
         }
-        update(changeLog);
-        changeLog.reset();
+        // JCR-1813: Only execute the update when there are some changes
+        if (changeLog.hasUpdates()) {
+            update(changeLog);
+            changeLog.reset();
+        }
 
         editMode = false;
     }



Mime
View raw message