jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcel Reutegger (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-580) Add Root#getRootTree (or getTreeRoot)
Date Thu, 24 Jan 2013 09:17:12 GMT

    [ https://issues.apache.org/jira/browse/OAK-580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13561517#comment-13561517

Marcel Reutegger commented on OAK-580:

This might become a bit controversial and is a bigger change,
but how about Root extends Tree? The JavaDoc already says Root
is the root of the tree. In JCR the node with path "/" is the
root node and also in Oak there is Tree.isRoot().
> Add Root#getRootTree (or getTreeRoot)
> -------------------------------------
>                 Key: OAK-580
>                 URL: https://issues.apache.org/jira/browse/OAK-580
>             Project: Jackrabbit Oak
>          Issue Type: Wish
>            Reporter: angela
>            Assignee: Michael Dürig
> in the current source we are having more than 150 usages of {code}Root.getTree("/"){code}.
most of those calls are used to retrieve
> other items or are passed to method calls that don't expect a null value.
> since from my understanding the root-tree will never be null this basically
> correct. nevertheless my IDE complains as the getTree method is annotated
> with @CheckForNull.
> wouldn't it be desirable to add a convenience method to the Root interface that allows
to access the root-tree? for example
> {code}
> /**
>  * Returns the root tree.
>  */
> @Nonnull
> Tree getRootTree();
> {code}

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message