[ 
https://issues.apache.org/jira/browse/OAK-606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13576762#comment-13576762
 ] 

Jukka Zitting commented on OAK-606:
-----------------------------------

bq. it might be better to make the last line from above also throw an 
IllegalItemStateException

+0 as long as we recognize that this does add some overhead as all content 
accesses will need to check whether meanwhile a move has happened.

Also, how should the following code behave?

{code}
Node foo = sessionA.getNode("/foo");
sessionB.move("/foo", "/bar");
sessionB.getRootNode().addNode("foo");
sessionB.save();
sessionA.refresh();
foo.getPath(); // InvalidItemStateException?
{code}

If the last line should throw, how are we going to implement that? If not, why 
should the single-session case behave differently?
                
> Node becomes invalid after Session#move()
> -----------------------------------------
>
>                 Key: OAK-606
>                 URL: https://issues.apache.org/jira/browse/OAK-606
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: jcr
>            Reporter: angela
>         Attachments: OAK-606.patch
>
>
> moving or renaming an existing (saved) node renders that node instance
> invalid and any access on that node instance will throw IllegalStateException.

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