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:32:20 UTC

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

     [ https://issues.apache.org/jira/browse/OAK-1149?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marcel Reutegger resolved OAK-1149.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 0.11

Done in http://svn.apache.org/r1539346

> 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
>             Fix For: 0.11
>
>
> 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)