Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 23109 invoked from network); 2 Apr 2008 08:52:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Apr 2008 08:52:54 -0000 Received: (qmail 68869 invoked by uid 500); 2 Apr 2008 08:52:53 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 68841 invoked by uid 500); 2 Apr 2008 08:52:53 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 68831 invoked by uid 99); 2 Apr 2008 08:52:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Apr 2008 01:52:53 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Apr 2008 08:52:10 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 6A384234C0B3 for ; Wed, 2 Apr 2008 01:50:24 -0700 (PDT) Message-ID: <307560257.1207126224433.JavaMail.jira@brutus> Date: Wed, 2 Apr 2008 01:50:24 -0700 (PDT) From: "Jan Haderka (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Created: (JCR-1512) Incorrect check for replace when importing item with colliding id MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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 Affects Versions: core 1.4.2 Reporter: Jan Haderka Priority: Minor 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.