jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig (JIRA) <j...@apache.org>
Subject [jira] [Resolved] (OAK-2397) Provide a way to turn Tree instances into a NodeState
Date Fri, 06 Mar 2015 11:30:38 GMT

     [ https://issues.apache.org/jira/browse/OAK-2397?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Michael Dürig resolved OAK-2397.
    Resolution: Won't Fix

Resolving as won't fix. Let's take this up again once we have a case for it. 

> 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
>            Priority: Minor
>         Attachments: OAK-2397-1.patch, OAK-2397.patch
> 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

View raw message