You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Marcel Reutegger (JIRA)" <ji...@apache.org> on 2013/11/06 15:24:17 UTC

[jira] [Created] (OAK-1149) Avoid exists check in NodeDelegate.getChild() with empty path

Marcel Reutegger created OAK-1149:
-------------------------------------

             Summary: Avoid exists check in NodeDelegate.getChild() with empty path
                 Key: OAK-1149
                 URL: https://issues.apache.org/jira/browse/OAK-1149
             Project: Jackrabbit Oak
          Issue Type: Improvement
          Components: jcr
            Reporter: Marcel Reutegger
            Assignee: Marcel Reutegger
            Priority: Minor


This is a minor optmization when {{relPath}} in {{NodeDelegate.getChild()}} is the empty path. In this case there is no need to get the tree, check existence and wrap it with a NodeDelegate. The method can just return {{this}}.

Most of the time {{relPath}} is not empty, but it can still happen quite frequently because {{Node.addNode()}} is usually called with a name only.



--
This message was sent by Atlassian JIRA
(v6.1#6144)