jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1411731 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/InitialContent.java
Date Tue, 20 Nov 2012 16:31:27 GMT
Author: angela
Date: Tue Nov 20 16:31:26 2012
New Revision: 1411731

URL: http://svn.apache.org/viewvc?rev=1411731&view=rev
Log:
reverting 1411623

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/InitialContent.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/InitialContent.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/InitialContent.java?rev=1411731&r1=1411730&r2=1411731&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/InitialContent.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/nodetype/InitialContent.java
Tue Nov 20 16:31:26 2012
@@ -22,14 +22,10 @@ import org.apache.jackrabbit.JcrConstant
 import org.apache.jackrabbit.oak.api.CommitFailedException;
 import org.apache.jackrabbit.oak.api.Type;
 import org.apache.jackrabbit.oak.core.RootImpl;
-import org.apache.jackrabbit.oak.plugins.index.IndexHookManager;
-import org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexHookProvider;
 import org.apache.jackrabbit.oak.plugins.memory.PropertyStates;
-import org.apache.jackrabbit.oak.spi.commit.CommitHook;
 import org.apache.jackrabbit.oak.spi.lifecycle.RepositoryInitializer;
 import org.apache.jackrabbit.oak.spi.security.user.UserConstants;
 import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
-import org.apache.jackrabbit.oak.spi.state.NodeState;
 import org.apache.jackrabbit.oak.spi.state.NodeStore;
 import org.apache.jackrabbit.oak.spi.state.NodeStoreBranch;
 
@@ -47,8 +43,7 @@ public class InitialContent implements R
     public void initialize(NodeStore store) {
         NodeStoreBranch branch = store.branch();
 
-        NodeState before = branch.getRoot();
-        NodeBuilder root = before.builder();
+        NodeBuilder root = branch.getRoot().builder();
         root.setProperty("jcr:primaryType", "rep:root", Type.NAME);
 
         if (!root.hasChildNode("jcr:system")) {
@@ -100,9 +95,7 @@ public class InitialContent implements R
                 .setProperty("reindex", true);
         }
         try {
-            CommitHook hook =
-                    new IndexHookManager(new PropertyIndexHookProvider());
-            branch.setRoot(hook.processCommit(before, root.getNodeState()));
+            branch.setRoot(root.getNodeState());
             branch.merge();
         } catch (CommitFailedException e) {
             throw new RuntimeException(e); // TODO: shouldn't need the wrapper



Mime
View raw message