[
https://issues.apache.org/jira/browse/OAK-781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13635128#comment-13635128
]
Jukka Zitting commented on OAK-781:
-----------------------------------
I think a crucial bit here is the behavior of the {{child(String)}} method.
It's defined to automatically create a new child node if the named child does
not already exist, which is a bit troublesome when you mix read permissions in
the picture. Instead we might want to explicitly split the method to separate
{{getChild(String)}} and {{addChild(String)}} methods that make the intention
of higher-level operations clear. For example, if the test case used
{{getChild("b")}} then the {{b.exists()}} call should return {{false}}, and if
{{addChild("b")}} it should return {{true}}. Also, if {{addChild("b")}} was
called, then the later {{c.hasProperty("c")}} should return {{false}} as the
newly added "b" node should shadow the previous, partially read-protected
subtree.
> Clarify / fix effects of MISSING_NODE as base state of NodeBuilder
> ------------------------------------------------------------------
>
> Key: OAK-781
> URL: https://issues.apache.org/jira/browse/OAK-781
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: core
> Reporter: Michael Dürig
>
> Having a {{MISSING_NODE}} respectively a node state that returns false for
> its {{exists}} method as a base state of a node builder results in undefined
> behaviour. We need to clarify how to handle such cases for resolving OAK-766.
--
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