xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edwin Goei <edwi...@sun.com>
Subject Re: [crimson] bug on ElementNode2.getAttributeNodeNS
Date Thu, 21 Feb 2002 00:06:57 GMT
Christophe Jolif wrote:
> 
> Hi,
> 
> The following small test case crashes with crimson (cvs snapshot):
> 
> import org.w3c.dom.*;
> 
> import org.apache.crimson.tree.*;
> 
> public class BugB
> {
>      // CJO 02/2002
>      public static void main(String[] arg) {
>         // directly create XmlDocument just for the prupose
>         // of having a smaller test...
>          XmlDocument doc = new XmlDocument();
>          Element elt = doc.createElementNS(null, "foo");
>          doc.appendChild(elt);
>          elt.setAttributeNS(null, "bar", "bar_value");
>         // this line should not return the previous
>         // element has the namespace is not the same
>         // but it should not crash either...
>          elt.getAttributeNS("myNS", "bar");
>      }
> }
> 
> A patch could be:
> 
> diff -h -r1.11 ElementNode2.java
> 434,435c434,436
> <                     || attr.getNamespaceURI().equals(namespaceURI))) {
> <                 return attr;
> ---
>  >                     || (attr.getNamespaceURI() != null &&
>  >                       attr.getNamespaceURI().equals(namespaceURI)))) {
>  >             return attr;
> 437c438
> <         }
> ---
>  >       }
> 439c440
> <
> ---
>  >
> 
> Thanks.
> --
> Christophe

Thanks for the patch.  Would you mind creating a bug report under
category crimson?

-Edwin

---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org


Mime
View raw message