jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1407022 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java
Date Thu, 08 Nov 2012 11:44:30 GMT
Author: mduerig
Date: Thu Nov  8 11:44:30 2012
New Revision: 1407022

URL: http://svn.apache.org/viewvc?rev=1407022&view=rev
Log:
OAK-417: Refactor/reimplement TreeImpl.getStatus and TreeImpl.getPropertyStatus to take advantage
of the underlying NodeBuilder

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

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java?rev=1407022&r1=1407021&r2=1407022&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java
Thu Nov  8 11:44:30 2012
@@ -200,13 +200,17 @@ public class TreeImpl implements Tree {
         }
     }
 
-    // FIXME rely on underlying mechanism to determine whether a node has been removed. (OAK-417)
     private boolean isRemoved() {
-        try {
-            return getNodeBuilder().isRemoved();
-        } catch (IllegalStateException e) {
+        if (isRoot()) {
+            return false;
+        }
+        if (parent.nodeBuilder == null) {
+            return false;
+        }
+        if (parent.nodeBuilder.isRemoved()) {
             return true;
         }
+        return getNodeBuilder().isRemoved();
     }
 
     @Override



Mime
View raw message