jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1556876 - in /jackrabbit/oak/trunk: oak-core/src/main/java/org/apache/jackrabbit/oak/core/ oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/ oak-mk-api/src/main/java/org/apache/jackrabbit/mk/api/ oak-mk/src/main/java/org/apache/jack...
Date Thu, 09 Jan 2014 16:59:15 GMT
Author: angela
Date: Thu Jan  9 16:59:14 2014
New Revision: 1556876

URL: http://svn.apache.org/r1556876
Log:
minor improvement wrt to :conflict constants

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/AbstractTree.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/NodeStoreKernel.java
    jackrabbit/oak/trunk/oak-mk-api/src/main/java/org/apache/jackrabbit/mk/api/MicroKernel.java
    jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/model/StagedNodeTree.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/AbstractTree.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/AbstractTree.java?rev=1556876&r1=1556875&r2=1556876&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/AbstractTree.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/AbstractTree.java
Thu Jan  9 16:59:14 2014
@@ -19,31 +19,29 @@
 
 package org.apache.jackrabbit.oak.core;
 
-import static com.google.common.base.Preconditions.checkNotNull;
-import static com.google.common.collect.Iterables.filter;
-import static com.google.common.collect.Iterables.size;
-import static com.google.common.collect.Iterables.transform;
-import static org.apache.jackrabbit.oak.api.Tree.Status.EXISTING;
-import static org.apache.jackrabbit.oak.api.Tree.Status.MODIFIED;
-import static org.apache.jackrabbit.oak.api.Tree.Status.NEW;
-import static org.apache.jackrabbit.oak.api.Type.NAME;
-import static org.apache.jackrabbit.oak.spi.state.NodeStateUtils.isHidden;
-
 import java.util.Iterator;
-
 import javax.annotation.Nonnull;
 
 import com.google.common.base.Function;
 import com.google.common.base.Predicate;
-
-import org.apache.jackrabbit.mk.api.MicroKernel;
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.api.Tree;
 import org.apache.jackrabbit.oak.plugins.index.IndexConstants;
 import org.apache.jackrabbit.oak.plugins.index.reference.NodeReferenceConstants;
+import org.apache.jackrabbit.oak.spi.state.ConflictAnnotatingRebaseDiff;
 import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
 
+import static com.google.common.base.Preconditions.checkNotNull;
+import static com.google.common.collect.Iterables.filter;
+import static com.google.common.collect.Iterables.size;
+import static com.google.common.collect.Iterables.transform;
+import static org.apache.jackrabbit.oak.api.Tree.Status.EXISTING;
+import static org.apache.jackrabbit.oak.api.Tree.Status.MODIFIED;
+import static org.apache.jackrabbit.oak.api.Tree.Status.NEW;
+import static org.apache.jackrabbit.oak.api.Type.NAME;
+import static org.apache.jackrabbit.oak.spi.state.NodeStateUtils.isHidden;
+
 /**
  * {@code AbstractTree} provides default implementations for most
  * read methods of {@code Tree}. Furthermore it handles the
@@ -62,7 +60,7 @@ public abstract class AbstractTree imple
             IndexConstants.INDEX_CONTENT_NODE_NAME,
             NodeReferenceConstants.REF_NAME,
             NodeReferenceConstants.WEAK_REF_NAME,
-            MicroKernel.CONFLICT_NAME};
+            ConflictAnnotatingRebaseDiff.CONFLICT};
 
     /**
      * Name of this tree

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/NodeStoreKernel.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/NodeStoreKernel.java?rev=1556876&r1=1556875&r2=1556876&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/NodeStoreKernel.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/NodeStoreKernel.java
Thu Jan  9 16:59:14 2014
@@ -73,7 +73,7 @@ public class NodeStoreKernel implements 
                         public Validator childNodeAdded(
                                 String name, NodeState after)
                                 throws CommitFailedException {
-                            if (name.equals(":conflict")) {
+                            if (name.equals(MicroKernel.CONFLICT)) {
                                 throw new CommitFailedException(
                                         CommitFailedException.STATE, 0, "Conflict");
                             }

Modified: jackrabbit/oak/trunk/oak-mk-api/src/main/java/org/apache/jackrabbit/mk/api/MicroKernel.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mk-api/src/main/java/org/apache/jackrabbit/mk/api/MicroKernel.java?rev=1556876&r1=1556875&r2=1556876&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mk-api/src/main/java/org/apache/jackrabbit/mk/api/MicroKernel.java
(original)
+++ jackrabbit/oak/trunk/oak-mk-api/src/main/java/org/apache/jackrabbit/mk/api/MicroKernel.java
Thu Jan  9 16:59:14 2014
@@ -71,7 +71,7 @@ import javax.annotation.Nonnull;
  */
 public interface MicroKernel {
 
-    public static final String CONFLICT_NAME = ":conflict";
+    public static final String CONFLICT = ":conflict";
 
     //---------------------------------------------------------< REVISION ops >
 
@@ -508,7 +508,7 @@ public interface MicroKernel {
      * <p/>
      * If rebasing results in a conflict, conflicting nodes are annotated with a conflict
      * marker denoting the type of the conflict and the value(s) before the rebase operation.
-     * The conflict marker is an internal node with the name {@link #CONFLICT_NAME} and is
added
+     * The conflict marker is an internal node with the name {@link #CONFLICT} and is added
      * to the node whose properties or child nodes are in conflict.
      * <p/>
      * type of conflicts:

Modified: jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/model/StagedNodeTree.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/model/StagedNodeTree.java?rev=1556876&r1=1556875&r2=1556876&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/model/StagedNodeTree.java
(original)
+++ jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/model/StagedNodeTree.java
Thu Jan  9 16:59:14 2014
@@ -21,6 +21,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 
+import org.apache.jackrabbit.mk.api.MicroKernel;
 import org.apache.jackrabbit.mk.json.JsonObject;
 import org.apache.jackrabbit.mk.store.NotFoundException;
 import org.apache.jackrabbit.mk.store.RevisionStore;
@@ -496,7 +497,7 @@ public class StagedNodeTree {
     }
 
     private StagedNode getOrAddConflictMarker(StagedNode parent, String name) {
-        StagedNode conflict = getOrAddNode(parent, ":conflict");
+        StagedNode conflict = getOrAddNode(parent, MicroKernel.CONFLICT);
         return getOrAddNode(conflict, name);
     }
 



Mime
View raw message