jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r1762275 - /jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/ChildNodeStash.java
Date Mon, 26 Sep 2016 06:34:15 GMT
Author: tripod
Date: Mon Sep 26 06:34:15 2016
New Revision: 1762275

URL: http://svn.apache.org/viewvc?rev=1762275&view=rev
Log:
JCRVLT-106 Importing an user and children with UPDATE mode causes unnecessary warnings

Modified:
    jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/ChildNodeStash.java

Modified: jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/ChildNodeStash.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/ChildNodeStash.java?rev=1762275&r1=1762274&r2=1762275&view=diff
==============================================================================
--- jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/ChildNodeStash.java
(original)
+++ jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/ChildNodeStash.java
Mon Sep 26 06:34:15 2016
@@ -127,7 +127,11 @@ public class ChildNodeStash {
                 Node child = iter.nextNode();
                 String newPath = parent.getPath() + "/" + child.getName();
                 try {
-                    session.move(child.getPath(), newPath);
+                    if (session.nodeExists(newPath)) {
+                        log.debug("Skipping restore from temporary location {} as node already
exists at {}", child.getPath(), newPath);
+                    } else {
+                        session.move(child.getPath(), newPath);
+                    }
                 } catch (RepositoryException e) {
                     log.warn("Unable to move child back to new location at {} due to: {}.
Node will remain in temporary location: {}",
                             new Object[]{newPath, e.getMessage(), child.getPath()});



Mime
View raw message