jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1338236 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStore.java
Date Mon, 14 May 2012 15:03:30 GMT
Author: mduerig
Date: Mon May 14 15:03:29 2012
New Revision: 1338236

URL: http://svn.apache.org/viewvc?rev=1338236&view=rev
Log:
OAK-100: Proper CommitHook handling in NodeStore
- pass correct node state as before argument to afterCommit method

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

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStore.java?rev=1338236&r1=1338235&r2=1338236&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStore.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStore.java
Mon May 14 15:03:29 2012
@@ -107,7 +107,8 @@ public class KernelNodeStore extends Abs
 
     @Override
     public void setRoot(NodeState newRoot) throws CommitFailedException {
-        NodeState toCommit = commitHook.beforeCommit(this, getBaseState(newRoot), newRoot);
+        NodeState baseState = getBaseState(newRoot);
+        NodeState toCommit = commitHook.beforeCommit(this, baseState, newRoot);
 
         KernelNodeState committed;
         if (toCommit instanceof NodeStateBuilderContext.NodeDecorator) {
@@ -117,7 +118,7 @@ public class KernelNodeStore extends Abs
             throw new CommitFailedException("Alien node state: " + newRoot);
         }
 
-        commitHook.afterCommit(this, toCommit, committed);
+        commitHook.afterCommit(this, baseState, committed);
     }
 
     @Override



Mime
View raw message