Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.8
-
None
-
Windows 7 64 bits // Java 1.7.0_67
-
Important
Description
There is a bad "if" condition in class org.apache.jackrabbit.core.xml.SessionImporter when trying to resolve UUID conflicts at line 377:
SessionImporter .java
// edge case: colliding node does have same uuid // (see http://issues.apache.org/jira/browse/JCR-1128) if (!(existing.getId().equals(id) && (uuidBehavior == ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING || uuidBehavior == ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING))) { throw new ItemExistsException( "Node with the same UUID exists:" + existing); }
In our case, the old id is filled and the new id is null, so "existing.getId().equals(id)" will always return false so the "if" condition will always be true, what is not correct, because uuids are not the same (as the exception says).