Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 27403 invoked from network); 17 Sep 2007 09:20:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Sep 2007 09:20:07 -0000 Received: (qmail 52415 invoked by uid 500); 17 Sep 2007 09:19:57 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 52377 invoked by uid 500); 17 Sep 2007 09:19:57 -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 52367 invoked by uid 99); 17 Sep 2007 09:19:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Sep 2007 02:19:57 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of stefan.guggisberg@gmail.com designates 209.85.128.186 as permitted sender) Received: from [209.85.128.186] (HELO fk-out-0910.google.com) (209.85.128.186) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Sep 2007 09:19:55 +0000 Received: by fk-out-0910.google.com with SMTP id b27so2016349fka for ; Mon, 17 Sep 2007 02:19:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=yl8tt418oJZGizAwWSwKOg4vf0kF6YsnMtj53xNbfBQ=; b=CR0VFK+gZj1H7rJ3JBt09EYA+c4u6CAP/onidrFAUSNlHvRoRlOS4jvZzD+ArIC3PU2Ny2NbenGpasFzwJxjnaTzgWZUlBnCmlt9aUnygfvK7i5H1MPSp3/MZWIJwBlSPV6aRzsfSI8DAeKhOLfVVTuXg5kSoVyB93SkFi5flKg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=UlQQdooSbMP96jj8O0G5AEVGnDp8WGsMrynRcZi/bWQD3ZpR01yfJqV4zwCgsCHCQNa6loVlcbi5Dg+zv1lykDH/KQyytgaSStWD+k52vWnt3rlcq+RdWYSaiPm27PrPrxq42teexkGijlJnqVZ/hXM6Byx0VK+fN3tvXKAV8Ss= Received: by 10.82.189.6 with SMTP id m6mr4085678buf.1190020773581; Mon, 17 Sep 2007 02:19:33 -0700 (PDT) Received: by 10.82.171.9 with HTTP; Mon, 17 Sep 2007 02:19:33 -0700 (PDT) Message-ID: <90a8d1c00709170219q5f8cfd38h15206379228c4d3f@mail.gmail.com> Date: Mon, 17 Sep 2007 11:19:33 +0200 From: "Stefan Guggisberg" To: dev@jackrabbit.apache.org Subject: Re: Validation in QName class In-Reply-To: <90a8d1c00709170218t3e33d44fr94c8009e0d9a518b@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <34B0CDC6176518459F3A96E8C09196B8064C4EEE@darth-vader.nijmegen.gx.nl> <90a8d1c00709170218t3e33d44fr94c8009e0d9a518b@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org On 9/17/07, Stefan Guggisberg wrote: > hi martijn, > > On 9/17/07, Martijn Hendriks wrote: > > Hi all, > > > > The QName class does not do any validation on the syntax of the local > > part. As a result, it is really easy to destroy your repository by > > registration of a nodetype with, for instance, a property with QName > > {http://myapp/a}local1:local2. The NodeTypeRegistry only validates the > > prefix part on registration. The local part is validated when the > > custom_nodetypes.xml are read in on a subsequent startup which will fail > > because of the invalid name... (JR 1.3) > > > > The javadoc of the Qname constructor says explicitly that the format of > > the local part is not validated and that the NameFormat class should be > > used. Imo it would be good to validate the local part in both the > > constructor and the valueOf method, or is there a reason not to do this? > > QName's are only heavily used internally and assumed to be syntactically erm, i meant: "heavily used and internally only" > correct. validations are intentionally avoided for performance reasons. > > cheers > stefan > > > > > Best wishes, > > > > Martijn > > > > -- > > > > Martijn Hendriks > > creative online development B.V. > > > > t: 024 - 3888 261 > > f: 024 - 3888 621 > > e: martijnh@gx.nl > > > > Wijchenseweg 111 > > 6538 SW Nijmegen > > http://www.gx.nl/ > > >