jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: rev 47651 - incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core
Date Fri, 01 Oct 2004 16:17:01 GMT
Author: stefan
Date: Fri Oct  1 09:16:59 2004
New Revision: 47651

Modified:
   incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/ItemImpl.java
Log:
bug fix: Item.getAncestor(int) throws PathNotFoundException instead of ItemNotFoundException

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/ItemImpl.java
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/ItemImpl.java	(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/ItemImpl.java	Fri Oct 
1 09:16:59 2004
@@ -1147,12 +1147,11 @@
             return itemMgr.getRootNode();
         }
 
-        // Path.getAncestor requires relative degree, i.e. we need
-        // to convert absolute to relative ancestor degree
-        Path path = getPrimaryPath();
-        Path ancestorPath = path.getAncestor(path.getAncestorCount() - degree);
-
         try {
+            // Path.getAncestor requires relative degree, i.e. we need
+            // to convert absolute to relative ancestor degree
+            Path path = getPrimaryPath();
+            Path ancestorPath = path.getAncestor(path.getAncestorCount() - degree);
             return itemMgr.getItem(ancestorPath);
         } catch (PathNotFoundException pnfe) {
             throw new ItemNotFoundException();

Mime
View raw message