[
https://issues.apache.org/jira/browse/OAK-595?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
angela updated OAK-595:
-----------------------
Component/s: core
> Naming consistency in QueryEngine#getRootTree
> ---------------------------------------------
>
> Key: OAK-595
> URL: https://issues.apache.org/jira/browse/OAK-595
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: core
> Reporter: angela
>
> it feels a bit awkward to me that the abstract method getRootTree on
> QueryEngineImpl returns
> a Root object and not a Tree.
> i had a quick look and it turned out that it is only used for accessing tree
> instances...
> so i would suggest to either
> - rename method to getRoot() and leave the code otherwise unchanged.
> - keep the name but change the signature to return Tree and then adjust the
> usages accordingly.
> currently it is only used upon calling Query#setRootTree which would need
> in this case to
> be changed to Tree as well... the lookup of other trees by path would in
> this case no longer
> work with Root#getTree(absPath) but rather be
> rootTree.getLocation().getTree(relPath).getTree().
> permissions wise the outcome would be the same.
> i came across this while trying to obtain a query engine in the permission
> validator provider
> which due to the current usage and definition of
> validatorprovider#getRootProvider doesn't
> have access to the root at all.
--
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