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 "Alex Parvulescu (JIRA)" <ji...@apache.org> on 2013/02/13 15:44:13 UTC
[jira] [Resolved] (OAK-595) Naming consistency in
QueryEngine#getRootTree
[ https://issues.apache.org/jira/browse/OAK-595?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alex Parvulescu resolved OAK-595.
---------------------------------
Resolution: Fixed
Fix Version/s: 0.7
Assignee: Alex Parvulescu
fixed in rev 1445626.
I went with the "pass the Tree around instead of the Root" option.
It feels like there's a small overlap between the _rootState_ and the _rootTree_ in the _Query_ class. I think the code could be further refactored into using just one of the 2.
> 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
> Assignee: Alex Parvulescu
> Fix For: 0.7
>
>
> 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