jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1357267 - /jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeDelegate.java
Date Wed, 04 Jul 2012 13:51:23 GMT
Author: mduerig
Date: Wed Jul  4 13:51:22 2012
New Revision: 1357267

URL: http://svn.apache.org/viewvc?rev=1357267&view=rev
Log:
OAK-165: NodeDelegate should not use Tree.getChild() but rather Root.getTree()

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeDelegate.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeDelegate.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeDelegate.java?rev=1357267&r1=1357266&r2=1357267&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeDelegate.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeDelegate.java
Wed Jul  4 13:51:22 2012
@@ -229,14 +229,8 @@ public class NodeDelegate extends ItemDe
     // -----------------------------------------------------------< private >---
 
     private Tree getTree(String relPath) throws InvalidItemStateException {
-        Tree tree = getTree();
-        for (String name : PathUtils.elements(relPath)) {
-            if (tree == null) {
-                return null;
-            }
-            tree = tree.getChild(name);
-        }
-        return tree;
+        String absPath = PathUtils.concat(getPath(), relPath);
+        return sessionDelegate.getTree(absPath);
     }
 
     @CheckForNull



Mime
View raw message