jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1528442 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/MutableTree.java
Date Wed, 02 Oct 2013 12:28:18 GMT
Author: thomasm
Date: Wed Oct  2 12:28:18 2013
New Revision: 1528442

URL: http://svn.apache.org/r1528442
Log:
OAK-1063 MutableTree.enter() simplification

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

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/MutableTree.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/MutableTree.java?rev=1528442&r1=1528441&r2=1528442&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/MutableTree.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/MutableTree.java
Wed Oct  2 12:28:18 2013
@@ -157,7 +157,14 @@ public class MutableTree extends Abstrac
 
     @Override
     public boolean exists() {
-        return enter();
+        root.checkLive();
+        if (isHidden(name)) {
+            return false;
+        } else if (applyPendingMoves()) {
+            return reconnect();
+        } else {
+            return nodeBuilder.exists();
+        }
     }
 
     @Override
@@ -458,17 +465,13 @@ public class MutableTree extends Abstrac
     }
 
     private void checkExists() {
-        checkState(enter(), "This tree does not exist");
+        checkState(exists(), "This tree does not exist");
     }
 
-    private boolean enter() {
+    private void enter() {
         root.checkLive();
-        if (isHidden(name)) {
-            return false;
-        } else if (applyPendingMoves()) {
-            return reconnect();
-        } else {
-            return nodeBuilder.exists();
+        if (applyPendingMoves()) {
+            reconnect();
         }
     }
 



Mime
View raw message