You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by sa...@ca.ibm.com on 2001/03/15 21:03:09 UTC

Patch - fix for [Bug 816] - The parser does not raise an error when the facet "minLength" for the datatype "language" has a value other than nonNegativeInteger.

Hi all, the reason is that we don't check whether fMinLength >= 0 for
string datatype. The patch file is attached, and the change is shown below.

diff -w -r1.21 StringDatatypeValidator.java
171a172,178
>             if ( (fFacetsDefined & DatatypeValidator.FACET_MINLENGTH ) !
= 0 ) {
>                 if ( fMinLength < 0 ) {
>                     throw new InvalidDatatypeFacetException( "Value of
minLength = '" + fMinLength +
>                                                              "' must be
greater than or equal to '0'.");
>                 }
>             }
>

Cheers,
Sandy Gao
Software Developer, IBM Canada
(1-416) 448-3255
sandygao@ca.ibm.com
(See attached file: diff.txt)