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

Michael Dürig commented on OAK-609:
-----------------------------------

I think {{NodeStore.getRoot()}} is fine. Through the return type it is clear 
that this is not about {{Root}} and repeating that information in the method 
name just makes it unnecessarily long. 

Regarding the method names in {{NodeStoreBranch}} I agree that these are not 
consistent. The problem is that both methods, {{getBase()}} and {{getRoot()}}, 
are about the root node state. Just at different revisions namely the base 
revision of the base and the head revisions of the branch, respectively. I 
suggest to either rename them to {{getBaseRoot()}} and {{getHeadRoot()}} or 
(with slight preference) to the shorter {{getBase()}} and {{getHead()}}. (And 
{{setRoot()}} should be renamed accordingly of course.)




                
> Rename 'root' methods in NodeStore and NodeStoreBranch
> ------------------------------------------------------
>
>                 Key: OAK-609
>                 URL: https://issues.apache.org/jira/browse/OAK-609
>             Project: Jackrabbit Oak
>          Issue Type: Wish
>            Reporter: angela
>            Priority: Minor
>
> Currently we have some naming confusions in NodeStore and
> NodeStoreBranch and the various implementations.
> both interfaces define methods to access the node state associated with
> the root node with are called #getRoot() and in NodeStoreBranch also 
> #setRoot() while the corresponding fields are name 'head' or 'root'.
> since oak defines a Root interface which doesn't represent the root node state
> i would suggest to rename the methods mentioned above to something less 
> confusing for example
> - getRootState
> - getHead
>  

--
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

Reply via email to