jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (Closed) (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (JCR-2473) Cloning a tree containing shareable nodes into another workspace throws ItemExistsException
Date Tue, 08 Nov 2011 15:57:51 GMT

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

Jukka Zitting closed JCR-2473.
------------------------------

    
> Cloning a tree containing shareable nodes into another workspace throws ItemExistsException
> -------------------------------------------------------------------------------------------
>
>                 Key: JCR-2473
>                 URL: https://issues.apache.org/jira/browse/JCR-2473
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 2.0-beta6
>            Reporter: Thomas Draier
>            Assignee: Dominique Pfister
>             Fix For: 2.1
>
>
> There's a problem when trying to clone a tree in another workspace, when this tree contains
shareable nodes.
> Let ws1 be one workspace, which contains one node A. This node has two sub-nodes B and
C. B and C share a shareable sub-node D :
> A 
> |   \
> B  C
> |    |
> D  D
> Let ws2 be a second workspace. Then calling ws2.clone("ws1" , "/A" , "/A" , false) throws
an ItemExistsException ( copyNodeState line 1628 ) . This is done when the copyNodeState is
checking if the nodeId is already present in the workspace - which is the case when copying
the second instance of the shareable node. I can't find in the specification something about
this case - but it would be logical to add a share to the node when coming across this situation
- at least in the CLONE ( and probable COPY too ) cases. I don't know what would be expected
in the CLONE_REMOVE_EXISTING case - we might not want to remove the node if it's shareable,
and also add a share here.
> I fixed the issue by handling the case the node is shareable in the COPY and CLONE cases
of copyNodeState - you'll find attached the corresponding patch. Do you think this solution
is ok ?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message