Hi, > On 9/17/07, Martijn Hendriks <[EMAIL PROTECTED]> wrote: > > Performance is a good argument of course. For this > particular problem, > > however, I think that some check inside Jackrabbit is > needed because > > the whole repository may become unusable by one wrong QName. The > > NodeTypeRegistry.validateNodeTypeDef method could be used for that. > > What do you think about adding some checks for invalid QNames there? > > Sounds like a patch? :-)
Well, yes :). > However, the officially supported node type registration > methods are the ones in o.a.j.api.JackrabbitNodeTypeManager, > and there we do validate all the QNames. If you are using > NodeTypeRegistry directly, then I think it should be your > responsibility to do the validation before constructing the > QName instances. Ok, that's fair. We use the NodeTypeRegistry directly because we need to re-register nodetypes sometimes. The NodeTypeRegistry already has a method checkNamespace to check that the URI of a QName has been registered. Wouldn't adding a check with the NameFormat.checkFormat on the local name of the QName only make the registry more robust? Best wishes, Martijn > > BR, > > Jukka Zitting >
