jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1471387 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MutableNodeState.java
Date Wed, 24 Apr 2013 12:44:00 GMT
Author: mduerig
Date: Wed Apr 24 12:43:59 2013
New Revision: 1471387

URL: http://svn.apache.org/r1471387
Log:
OAK-781: Clarify / fix effects of MISSING_NODE as base state of NodeBuilder
lower visibility of internal methods

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MutableNodeState.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MutableNodeState.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MutableNodeState.java?rev=1471387&r1=1471386&r2=1471387&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MutableNodeState.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MutableNodeState.java
Wed Apr 24 12:43:59 2013
@@ -65,11 +65,11 @@ class MutableNodeState extends AbstractN
      */
     private final Map<String, MutableNodeState> nodes = newHashMap();
 
-    public MutableNodeState(boolean exists) {
+    private MutableNodeState(boolean exists) {
         this.base = exists ? EMPTY_NODE : MISSING_NODE;
     }
 
-    public MutableNodeState(@Nonnull NodeState base) {
+    MutableNodeState(@Nonnull NodeState base) {
         if (checkNotNull(base) instanceof ModifiedNodeState) {
             ModifiedNodeState modified = (ModifiedNodeState) base;
             this.base = modified.getBaseState();
@@ -106,7 +106,7 @@ class MutableNodeState extends AbstractN
         }
     }
 
-    public NodeState snapshot() {
+    NodeState snapshot() {
         assert base != null;
 
         Map<String, NodeState> nodes = newHashMap();
@@ -206,14 +206,14 @@ class MutableNodeState extends AbstractN
         }
     }
 
-    public boolean isConnected(String name) {
+    boolean isConnected(String name) {
         assert base != null;
 
         return nodes.get(name) != null ||
                 !nodes.containsKey(name) && base.getChildNode(name).exists();
     }
 
-    public MutableNodeState getChildNode(String name, boolean connect) {
+    MutableNodeState getChildNode(String name, boolean connect) {
         assert base != null;
 
         MutableNodeState child = nodes.get(name);
@@ -235,14 +235,14 @@ class MutableNodeState extends AbstractN
     }
 
     @Nonnull
-    public MutableNodeState setChildNode(String name, NodeState state) {
+    MutableNodeState setChildNode(String name, NodeState state) {
         // FIXME better implementation, which doesn't set the base state twice
         MutableNodeState child = getChildNode(name, true);
         child.reset(state);
         return child;
     }
 
-    public boolean isModified(NodeState before) {
+    boolean isModified(NodeState before) {
         if (nodes.isEmpty() && properties.isEmpty()) {
             return false;
         }
@@ -268,7 +268,7 @@ class MutableNodeState extends AbstractN
 
     }
 
-    public boolean removeChildNode(String name) {
+    boolean removeChildNode(String name) {
         assert base != null;
 
         if (base.getChildNode(name).exists()) {
@@ -279,7 +279,7 @@ class MutableNodeState extends AbstractN
         }
     }
 
-    public boolean removeProperty(String name) {
+    boolean removeProperty(String name) {
         assert base != null;
 
         if (base.hasProperty(name)) {
@@ -290,7 +290,7 @@ class MutableNodeState extends AbstractN
         }
     }
 
-    public void setProperty(PropertyState property) {
+    void setProperty(PropertyState property) {
         properties.put(property.getName(), property);
     }
 



Mime
View raw message