jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1360605 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/RootImpl.java
Date Thu, 12 Jul 2012 09:55:00 GMT
Author: mduerig
Date: Thu Jul 12 09:55:00 2012
New Revision: 1360605

URL: http://svn.apache.org/viewvc?rev=1360605&view=rev
Log:
minor: inline trivial private helper method, limit visibility to internal method

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

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/RootImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/RootImpl.java?rev=1360605&r1=1360604&r2=1360605&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/RootImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/RootImpl.java
Thu Jul 12 09:55:00 2012
@@ -147,7 +147,7 @@ public class RootImpl implements Root {
     public void rebase(ConflictHandler conflictHandler) {
         purgePendingChanges();
         NodeState base = getBaseState();
-        NodeState head = getCurrentRootState();
+        NodeState head = root.getNodeState();
         refresh();
         merge(base, head, root, conflictHandler);
     }
@@ -172,7 +172,7 @@ public class RootImpl implements Root {
 
     @Override
     public boolean hasPendingChanges() {
-        return !getBaseState().equals(getCurrentRootState());
+        return !getBaseState().equals(root.getNodeState());
     }
 
     @Override
@@ -200,39 +200,17 @@ public class RootImpl implements Root {
         purgePurgeListeners.add(purgeListener);
     }
 
-    /**
-     * Returns the current root node state
-     * @return root node state
-     */
-    @Nonnull
-    public NodeState getCurrentRootState() {
-        return root.getNodeState();
-    }
+    //------------------------------------------------------------< internal >---
 
     /**
      * Returns the node state from which the current branch was created.
      * @return base node state
      */
     @Nonnull
-    public NodeState getBaseState() {
+    NodeState getBaseState() {
         return branch.getBase();
     }
 
-    /**
-     * Returns a builder for constructing a new or modified node state.
-     * The builder is initialized with all the properties and child nodes
-     * from the given base node state.
-     *
-     * @param nodeState  base node state, or {@code null} for building new nodes
-     * @return  builder instance
-     */
-    @Nonnull
-    public NodeStateBuilder getBuilder(NodeState nodeState) {
-        return store.getBuilder(nodeState);
-    }
-
-    //------------------------------------------------------------< internal >---
-
     NodeStateBuilder createRootBuilder() {
         return store.getBuilder(branch.getRoot());
     }
@@ -253,7 +231,7 @@ public class RootImpl implements Root {
      */
     private void purgePendingChanges() {
         if (hasPendingChanges()) {
-            branch.setRoot(getCurrentRootState());
+            branch.setRoot(root.getNodeState());
         }
         notifyListeners();
     }



Mime
View raw message