You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by tr...@apache.org on 2005/04/28 14:26:27 UTC

svn commit: r165131 - /incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/HierarchyManagerImpl.java

Author: tripod
Date: Thu Apr 28 05:26:26 2005
New Revision: 165131

URL: http://svn.apache.org/viewcvs?rev=165131&view=rev
Log:
- avoid using zombies for getDepth and isAncestor calculations.

Modified:
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/HierarchyManagerImpl.java

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/HierarchyManagerImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/HierarchyManagerImpl.java?rev=165131&r1=165130&r2=165131&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/HierarchyManagerImpl.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/HierarchyManagerImpl.java Thu Apr 28 05:26:26 2005
@@ -389,10 +389,10 @@
             throws ItemNotFoundException, RepositoryException {
         try {
             int depth = 0;
-            ItemState state = getItemState(id, true);
+            ItemState state = getItemState(id, false);
             String parentUUID = state.getParentUUID();
             while (parentUUID != null) {
-                state = getItemState(new NodeId(parentUUID), true);
+                state = getItemState(new NodeId(parentUUID), false);
                 parentUUID = state.getParentUUID();
                 depth++;
             }
@@ -414,13 +414,13 @@
     public boolean isAncestor(NodeId nodeId, ItemId itemId)
             throws ItemNotFoundException, RepositoryException {
         try {
-            ItemState state = getItemState(itemId, true);
+            ItemState state = getItemState(itemId, false);
             String parentUUID = state.getParentUUID();
             while (parentUUID != null) {
                 if (parentUUID.equals(nodeId.getUUID())) {
                     return true;
                 }
-                state = getItemState(new NodeId(parentUUID), true);
+                state = getItemState(new NodeId(parentUUID), false);
                 parentUUID = state.getParentUUID();
             }
             return false;