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

Julian Reschke commented on JCRVLT-828:
---------------------------------------

Tried the obvious:

{code}
diff --git 
a/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/DocViewImporter.java
 
b/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/DocViewImporter.java
index bdab1ffb..1042b2e1 100644
--- 
a/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/DocViewImporter.java
+++ 
b/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/io/DocViewImporter.java
@@ -998,7 +998,7 @@ public class DocViewImporter implements 
DocViewParserHandler {
         Node updatedNode = null;
         Optional<String> identifier = ni.getIdentifier();
         // try to set uuid via sysview import if it differs from existing one
-        if (identifier.isPresent() && 
!node.getIdentifier().equals(identifier.get()) && 
!"rep:root".equals(ni.getPrimaryType().orElse(""))) {
+        if (IdConflictPolicy.LEGACY != idConflictPolicy && 
identifier.isPresent() && !node.getIdentifier().equals(identifier.get()) && 
!"rep:root".equals(ni.getPrimaryType().orElse(""))) {
             long startTime = System.currentTimeMillis();
             String previousIdentifier = node.getIdentifier();
             log.debug(
{code}

but that does not fix it.

> With IdConflictPolicy.LEGACY, the identifier of the target is overwritten
> -------------------------------------------------------------------------
>
>                 Key: JCRVLT-828
>                 URL: https://issues.apache.org/jira/browse/JCRVLT-828
>             Project: Jackrabbit FileVault
>          Issue Type: Bug
>          Components: vlt
>            Reporter: Julian Reschke
>            Assignee: Julian Reschke
>            Priority: Major
>             Fix For: 4.1.4
>
>
> With IdConflictPolicy.LEGACY, the identifier of the target is overwritten 
> with the identifier from the imported package (if present).
> It should be preserved.
> See https://jackrabbit.apache.org/filevault/referenceablenodes.html



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to