[
https://issues.apache.org/jira/browse/OAK-798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13646542#comment-13646542
]
Michael Dürig commented on OAK-798:
-----------------------------------
In revision 1477976 I refactored more places to not depend on {{TreeLocation}}.
All remaining cases are in one of the {{security}} packages. These usages seem
to take advantage of the unification of properties and nodes that
{{Treelocation}} provides. I think we have two options here:
# refactor the code to not use {{TreeLocation}} but operate on the underlying
{{Tree}} instances directly,
# refactor {{TreeLocation}} into a lightweight wrapper for these purposes and
remove in from the oak API.
[~anchela] WDYT?
> Review / refactor TreeImpl and related classes
> ----------------------------------------------
>
> Key: OAK-798
> URL: https://issues.apache.org/jira/browse/OAK-798
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: core
> Reporter: Michael Dürig
>
> Now that OAK-781 is nearly complete, I'd like to follow up with pulling the
> new functionality into {{TreeImpl}} and its friends. A rough sketch of what I
> have in mind:
> * Apply the concept of existence and iterability of nodes to {{Tree}}
> instances. So {{Tree}} would have a method {{exists}} with the same semantics
> as that on {{NodeBuilder}}. Namely non existing trees could be used to
> navigate to its children/parent. But can not be used to iterate
> children/properties nor to modify the tree in any way.
> * {{TreeLocation}} and its implementations would go away since trees could be
> navigated by its own means now.
> * Provide two {{Tree}} implementations: {{MutableTree}} and
> {{ImmutableTree}}. The former would replace {{TreeImpl}} and the latter would
> unify the current {{ReadOnlyTree}} and {{ImmutableTree}} implementations.
> Roughly the former would be based on {{NodeBuilder}} while the latter would
> be based on {{NodeState}}. Only the latter would implement {{equals}} such
> that two such trees are equal when its underlying node states and its names
> are equal.
--
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