Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 69965 invoked from network); 22 Apr 2008 01:22:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Apr 2008 01:22:42 -0000 Received: (qmail 20651 invoked by uid 500); 22 Apr 2008 01:22:42 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 20623 invoked by uid 500); 22 Apr 2008 01:22:42 -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 20614 invoked by uid 99); 22 Apr 2008 01:22:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Apr 2008 18:22:42 -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; Tue, 22 Apr 2008 01:22:07 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 910C9234C0F4 for ; Mon, 21 Apr 2008 18:19:21 -0700 (PDT) Message-ID: <93414119.1208827161593.JavaMail.jira@brutus> Date: Mon, 21 Apr 2008 18:19:21 -0700 (PDT) From: "Jukka Zitting (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Updated: (JCR-1512) Incorrect check for replace when importing item with colliding id In-Reply-To: <307560257.1207126224433.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ 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.