jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1352177 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStoreBranch.java
Date Wed, 20 Jun 2012 15:57:43 GMT
Author: mduerig
Date: Wed Jun 20 15:57:43 2012
New Revision: 1352177

URL: http://svn.apache.org/viewvc?rev=1352177&view=rev
Log:
OAK-146: Wrong value passed to before parameter of CommitHook.afterCommit in KernelNodeStore.merge

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStoreBranch.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStoreBranch.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStoreBranch.java?rev=1352177&r1=1352176&r2=1352177&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStoreBranch.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStoreBranch.java
Wed Jun 20 15:57:43 2012
@@ -125,7 +125,8 @@ class KernelNodeStoreBranch implements N
         MicroKernel kernel = store.getKernel();
         CommitHook commitHook = store.getCommitHook();
 
-        NodeState oldRoot = store.getRoot();
+        NodeState preMergeRoot = store.getRoot();
+        NodeState oldRoot = preMergeRoot;
         NodeState toCommit = commitHook.beforeCommit(store, oldRoot, currentRoot);
         while (!currentRoot.equals(toCommit)) {
             setRoot(toCommit);
@@ -139,7 +140,7 @@ class KernelNodeStoreBranch implements N
             currentRoot = null;
             committed = null;
             KernelNodeState committed = new KernelNodeState(kernel, getValueFactory(), "/",
mergedRevision);
-            commitHook.afterCommit(store, oldRoot, committed);
+            commitHook.afterCommit(store, preMergeRoot, committed);
             return committed;
         }
         catch (MicroKernelException e) {



Mime
View raw message