Michael Dürig created OAK-2397: ---------------------------------- Summary: Provide a way to turn Tree instances into a NodeState Key: OAK-2397 URL: https://issues.apache.org/jira/browse/OAK-2397 Project: Jackrabbit Oak Issue Type: Improvement Components: core Reporter: Michael Dürig Assignee: Michael Dürig
In various places we need to access the underlying node state of an {{ImmutableTree}} (e.g. in {{MoveAwarePermissionValidator}}). Currently this is done by down casting from {{Tree}} to {{ImmutableTree}}, which is bad practice. I suggest we add a method to the {{TreeFactory}} we introduce with OAK-2391 to obtain a {{NodeState}} from a {{Tree}}: {code} public static NodeState createNodeState(@Nonnull Tree tree){} {code} So API consumers don't need to bother about the actual implementation. -- This message was sent by Atlassian JIRA (v6.3.4#6332)