Pascal Knüppel created JCR-3955:
-----------------------------------

             Summary: Cloning shareable Nodes into same workspace fails
                 Key: JCR-3955
                 URL: https://issues.apache.org/jira/browse/JCR-3955
             Project: Jackrabbit Content Repository
          Issue Type: Bug
    Affects Versions: 2.12.1
            Reporter: Pascal Knüppel


I tried to clone a shareable node into the same workspace. It worked with 
TransientRepository but it does not with standalone-server. It happens that 
both use different implementations:

TransienRepository uses:

{code:title=org.apache.jackrabbit.core.WorkspaceImpl.java|borderStyle=solid}
if (getName().equals(srcWorkspace)) {
            // clone to same workspace is allowed for mix:shareable nodes,
            // but only if removeExisting is false
            if (!removeExisting) {
                internalClone(srcAbsPath, destAbsPath);
                return;
            }
            // same as current workspace
            String msg = srcWorkspace + ": illegal workspace (same as current)";
            log.debug(msg);
            throw new RepositoryException(msg);
        }
{code}

and standalone-server uses:

{code:title=org.apache.jackrabbit.jcr2spi.WorkspaceImpl.java|borderStyle=solid}
// check workspace name
        if (getName().equals(srcWorkspace)) {
            // same as current workspace
            String msg = srcWorkspace + ": illegal workspace (same as current)";
            log.debug(msg);
            throw new RepositoryException(msg);
        }
{code}





--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to