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

Marcel Reutegger reassigned OAK-930:
------------------------------------

    Assignee: Marcel Reutegger
    
> VersionManager#isCheckedOut throws IllegalStateException
> --------------------------------------------------------
>
>                 Key: OAK-930
>                 URL: https://issues.apache.org/jira/browse/OAK-930
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core, jcr
>            Reporter: angela
>            Assignee: Marcel Reutegger
>
> the currently implementation of VersionManager#isCheckedOut will throws
> IllegalStateException if the node at the specified path is not versionable 
> and the root node is not accessible to the editing session.
> the issue is caused by the implementation of 
> ReadOnlyVersionManager#isCheckedOut
> which looks as follows:
> {code}
> if (checkNotNull(tree).exists()) {
>             PropertyState p = 
> tree.getProperty(VersionConstants.JCR_ISCHECKEDOUT);
>             if (p != null) {
>                 return p.getValue(Type.BOOLEAN);
>             } else if (tree.isRoot()) {
>                 return true;
>             }
>         } else {
>             // FIXME: this actually means access to the tree is restricted
>             // and may result in wrong isCheckedOut value. This should never
>             // be the case in a commit hook because it operates on non-access-
>             // controlled NodeStates. This means consistency is not at risk
>             // but it may mean oak-jcr sees a node as checked out even though
>             // it is in fact read-only because of a checked-in ancestor.
>         }
>         // otherwise return checkedOut status of parent
>         return isCheckedOut(tree.getParent());
> {code}
> in fact: in case of the failing calling the code hits the FIXME.
> IMHO the underlying problem is caused by the fact that the versionmanager 
> operates on the access controlled tree instances instead of relying on low 
> level NodeState or ImmutableTree.
> i will commit a test case illustrating the problem.

--
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

Reply via email to