Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 68472 invoked from network); 30 Sep 2009 08:02:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Sep 2009 08:02:57 -0000 Received: (qmail 34610 invoked by uid 500); 30 Sep 2009 08:02:56 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 34508 invoked by uid 500); 30 Sep 2009 08:02:56 -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 34500 invoked by uid 99); 30 Sep 2009 08:02:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Sep 2009 08:02:55 +0000 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, 30 Sep 2009 08:02:53 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 14478234C004 for ; Wed, 30 Sep 2009 01:02:32 -0700 (PDT) Message-ID: <2092381076.1254297752078.JavaMail.jira@brutus> Date: Wed, 30 Sep 2009 01:02:32 -0700 (PDT) From: "angela (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Updated: (JCR-2333) ItemImpl#validateTransientItems: Incomplete validation of mandatory child item In-Reply-To: <196138248.1254153796298.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JCR-2333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] angela updated JCR-2333: ------------------------ Attachment: JCR-2333_2.patch alternative patch accessing the ItemData instead of the Item itself in order to retrieve the definition. drawback: ItemManager#getItemData was private -> changed. > ItemImpl#validateTransientItems: Incomplete validation of mandatory child item > ------------------------------------------------------------------------------ > > Key: JCR-2333 > URL: https://issues.apache.org/jira/browse/JCR-2333 > Project: Jackrabbit Content Repository > Issue Type: Bug > Components: jackrabbit-core > Reporter: angela > Fix For: 2.0.0 > > Attachments: JCR-2333_2.patch, JCR_2333.patch > > > ItemImpl#validateTransientItems iterates over all mandatory child node/property definitions in order to assert that those items have > been created. However, it only checks if an item with the name defined by the mandatory item definition is present and not if that > existing item really has the mandatory definition. > the example i had: > - mandatory single-value property. > - there is the possibility to add residual props > - added a residual property with the name of the mandatory prop but with multiple values > -> changes are saved without exception. > -> the node doesn't have a property with the mandatory definition. > ((without having tried it out, i think the same would be possible with child nodes)) > suggested fix: > if there is a child item with the mandatory-item-name -> make sure it's definition is mandatory (or the expected one...) > patch will follow. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.