jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r165131 - /incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/HierarchyManagerImpl.java
Date Thu, 28 Apr 2005 12:26:27 GMT
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;



Mime
View raw message