jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r1539346 - /jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/NodeDelegate.java
Date Wed, 06 Nov 2013 14:30:05 GMT
Author: mreutegg
Date: Wed Nov  6 14:30:04 2013
New Revision: 1539346

URL: http://svn.apache.org/r1539346
Log:
OAK-1149: Avoid exists check in NodeDelegate.getChild() with empty path

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

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/NodeDelegate.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/NodeDelegate.java?rev=1539346&r1=1539345&r2=1539346&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/NodeDelegate.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/NodeDelegate.java
Wed Nov  6 14:30:04 2013
@@ -324,6 +324,9 @@ public class NodeDelegate extends ItemDe
      */
     @CheckForNull
     public NodeDelegate getChild(String relPath) throws RepositoryException {
+        if (relPath.isEmpty()) {
+            return this;
+        }
         Tree tree = getTree(relPath);
         return tree == null || !tree.exists() ? null : new NodeDelegate(sessionDelegate,
tree);
     }



Mime
View raw message