Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-1512

Incorrect check for replace when importing item with colliding id

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • core 1.4.2
    • core 1.4.3
    • jackrabbit-core
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rah003 Jan Haderka
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: