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

Thomas Mueller commented on OAK-304:
------------------------------------

It seems to me that some existing code might call getCurrentRoot() / 
getCurrentHeadRoot() unnecessarily, such as NamespaceRegistryImpl.getURI(String 
prefix) and getPrefix(String uri). This is specially a problem because those 
methods are called from the oak-jcr SessionNameMapper.getOakPrefix() and this 
is called from SessionDelegate.getOakNameOrThrow() and so on.

But maybe I'm wrong and it is in fact important that those methods always 
operate on the head?
                
> Rename ContentSession.getCurrentRoot() to getCurrentHeadRoot()
> --------------------------------------------------------------
>
>                 Key: OAK-304
>                 URL: https://issues.apache.org/jira/browse/OAK-304
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>            Reporter: Thomas Mueller
>            Assignee: Thomas Mueller
>         Attachments: OAK-304.patch
>
>
> Renaming the method would make it clear that the method is potentially 
> expensive and the returned object reflects the head of the repository at the 
> time the method is called.

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