jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Reschke <julian.resc...@gmx.de>
Subject Re: JSR-283: character case mismatch between property type names and node type definitions
Date Fri, 07 Sep 2012 08:50:15 GMT
On 2012-09-07 00:35, Michael Dürig wrote:
>
> Hi,
>
> While working on property value constraints I stumbled on the following:
>
> [nt:propertyDefinition]
>    ...
> - jcr:requiredType (STRING) protected mandatory
>      < 'STRING', 'URI', 'BINARY', 'LONG', 'DOUBLE',
>        'DECIMAL', 'BOOLEAN', 'DATE', 'NAME', 'PATH',
>        'REFERENCE', 'WEAKREFERENCE', 'UNDEFINED'
>
> The type names are defined in javax.jcr.PropertyType. For example
>
> TYPENAME_STRING = "String";
>
> Now JSR-283 says about string constraints (3.7.3.6.1): "For STRING and
> URI properties, the constraint string is a regular expression pattern
> according to the syntax of java.util.regex.Pattern."
>
> So jcr:requiredType can be for example "STRING" but not "String". The
> former however results in an IllegalArgumentException when passed to
> PropertyType.valueFromName().
> ...

That looks like a spec inconsistency to me.

It appears the simplest way to fix this would be to change predefined 
values in nt:propertyDefinition.

Open a JSR-333 bug?

Best regards, Julian

Mime
View raw message