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

Jukka Zitting commented on OAK-1063:
------------------------------------

Makes sense. The basic rationale for the enter() method is to make sure that 
the internal state of the Tree instance is up to date with any pending moves 
and that the session is still open. It doesn't need to check whether the node 
still exists or is visible (which is what exists() does).

One followup I'd still like to make is to have exists() (and a few other 
methods like getParent()) call enter() for consistency. That way we'll have the 
move tracking in just one place.

> MutableTree.enter() simplification
> ----------------------------------
>
>                 Key: OAK-1063
>                 URL: https://issues.apache.org/jira/browse/OAK-1063
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core
>            Reporter: Thomas Mueller
>            Assignee: Thomas Mueller
>            Priority: Minor
>
> Currently, the method MutableTree.enter() is called a lot and returns a 
> boolean, but the return value is rarely used. 
> To me it's not clear why the method should return a value, and what that 
> value would mean (there is no javadoc). It seems to mean "exists", but then 
> we also have a method exists(). So it seems the additional work is not needed 
> when calling enter().



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to