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:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to