Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 39805 invoked from network); 16 Aug 2007 22:01:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Aug 2007 22:01:56 -0000 Received: (qmail 28893 invoked by uid 500); 16 Aug 2007 22:01:53 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 28872 invoked by uid 500); 16 Aug 2007 22:01: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 28861 invoked by uid 99); 16 Aug 2007 22:01:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Aug 2007 15:01:52 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Aug 2007 22:01:54 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 57BCE714208 for ; Thu, 16 Aug 2007 15:01:34 -0700 (PDT) Message-ID: <6920054.1187301694354.JavaMail.jira@brutus> Date: Thu, 16 Aug 2007 15:01:34 -0700 (PDT) From: "Christophe Lombart (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Commented: (JCR-1053) Calling size method of a ManageableArrayList causes NullPointerException In-Reply-To: <28038527.1186472279091.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JCR-1053?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:comment-tabpanel#action_12520387 ]=20 Christophe Lombart commented on JCR-1053: ----------------------------------------- Testing on !parentNode.hasNodes() is not sufficient. We have to check if th= e parent node has children based on a specific type. The type use for the c= ollection elements. It is possible to have other children (based on another= nt) which are not element of the collection.=20 > Calling size method of a ManageableArrayList causes NullPointerException > ------------------------------------------------------------------------ > > Key: JCR-1053 > URL: https://issues.apache.org/jira/browse/JCR-1053 > Project: Jackrabbit > Issue Type: Bug > Components: jcr-mapping > Affects Versions: 1.3 > Reporter: Andr=C3=A9 Bierwolf > Assignee: Christophe Lombart > Attachments: NTCollectionConverterImpl.diff > > > When using the NTCollectionConverterImpl with proxy=3D"true" a call on th= e size () method of a ManageableArrayList causes a NullPointerException if = there is no underlying List. LazyCollectionLoader doLoad returns null becau= se there is are no children. > The ManageableArrayList is created because the isNull method of the NTCol= lectionConverterImpl class always returns false.=20 > According to the comment line this is done because the getCollectionNodes= always returns a list.=20 > But after the fix for JCR-882 this is not correct anymore. > The attached fix corrects this.=20 > The only question remaining is how to differ between an empty list and a = null-value for the field containing the list. --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.