jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martijn Hendriks" <marti...@gx.nl>
Subject Validation in QName class
Date Mon, 17 Sep 2007 09:03:09 GMT
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?

Best wishes,



Martijn Hendriks
<GX> creative online development B.V.
t: 024 - 3888 261
f: 024 - 3888 621
e: martijnh@gx.nl
Wijchenseweg 111
6538 SW Nijmegen

View raw message