On Mon, 2006-04-17 at 09:11 +0100, Chris Burdess wrote:
> Lillian Angel wrote:
> > More bug fixes for the parser and related classes.
> >
> > 2006-04-12  Lillian Angel  <[EMAIL PROTECTED]>
> >
> >         * gnu/xml/dom/DomDocument.java
> >         (checkNCName): Removed unneeded part of check.
> 
> Hi Lillian,
> 
> --- gnu/xml/dom/DomDocument.java      12 Jan 2006 16:35:52 -0000      1.8
> +++ gnu/xml/dom/DomDocument.java      12 Apr 2006 16:04:42 -0000
> @@ -535,8 +535,7 @@
>       int index = name.indexOf(':');
>       if (index != -1)
>         {
> -        if (index == 0 || index == (len - 1) ||
> -            name.lastIndexOf(':') != index)
> +        if (index == 0 || name.lastIndexOf(':') != index)
>             {
>               throw new DomDOMException(DOMException.NAMESPACE_ERR,
>                                         name, null, 0);
> 
> That's wrong. The colon is not permitted to appear as the last  
> character in the string. You removed a valid check.

Sun does permit a ':' to be the last character in a string.

Lillian


Reply via email to