[cp-patches] FYI: gnu.xml.dom.html2.* fixes and additions

Chris Burdess dog at bluezoo.org
Mon Apr 17 08:11:03 UTC 2006


Lillian Angel wrote:
> More bug fixes for the parser and related classes.
>
> 2006-04-12  Lillian Angel  <langel at redhat.com>
>
>         * 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.
-- 
犬 Chris Burdess
   "They that can give up essential liberty to obtain a little safety
   deserve neither liberty nor safety." - Benjamin Franklin




-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://developer.classpath.org/pipermail/classpath-patches/attachments/20060417/31b3100e/PGP.pgp


More information about the Classpath-patches mailing list