You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Jukka Zitting (JIRA)" <ji...@apache.org> on 2008/04/22 03:19:21 UTC

[jira] Updated: (JCR-1512) Incorrect check for replace when importing item with colliding id

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

Jukka Zitting updated JCR-1512:
-------------------------------

      Component/s: jackrabbit-core
    Fix Version/s:     (was: 1.5)
                   core 1.4.3

Merged to the 1.4 branch in revision 650343.

> Incorrect check for replace when importing item with colliding id
> -----------------------------------------------------------------
>
>                 Key: JCR-1512
>                 URL: https://issues.apache.org/jira/browse/JCR-1512
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: core 1.4.2
>            Reporter: Jan Haderka
>            Priority: Minor
>             Fix For: core 1.4.3
>
>
> When fixing JCR-1128 bug was introduced due to incorrect check for UUID behavior. Current code is:
> 201 : 	 if (!(existing.getId().equals(id)
> 202 : 	&& (uuidBehavior == ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING
> 203 :	|| uuidBehavior == ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING))) {
> 204 :	throw new ItemExistsException(existing.safeGetJCRPath());
> 205 :	}
> While it should check for ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING in one of the cases (line 202 or 203).
> Also it is possible that id of imported item is not known and therefore value of "id" variable is null and check will always fail. Would be nice if this case can be handled as well.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.