axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eran Chinthaka" <chinth...@opensource.lk>
Subject RE:[Axis2] svn commit: r227034 - /webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMElementImpl.java
Date Wed, 03 Aug 2005 01:49:18 GMT
Hi Glen,

Is this enough to fix the problem.

I think following is required for that. 

        if (firstChild.getParent() != null) {
            firstChild.detach();
        }
        OMNode currentFirstChild = getFirstChild();
        if(currentFirstChild != null){
           currentFirstChild.insertSiblingBefore(firstChild);
        }else{
            this.firstChild = firstChild;
        }

-- Chinthaka

> -----Original Message-----
> From: gdaniels@apache.org [mailto:gdaniels@apache.org]
> Sent: Tuesday, August 02, 2005 10:33 PM
> To: axis-cvs@ws.apache.org
> Subject: svn commit: r227034 -
> /webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom
> /OMElementImpl.java
> 
> Author: gdaniels
> Date: Tue Aug  2 09:33:02 2005
> New Revision: 227034
> 
> URL: http://svn.apache.org/viewcvs?rev=227034&view=rev
> Log:
> Prevent NPE in OMBodyTest
> 
> Modified:
> 
> webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/
> OMElementImpl.java
> 
> Modified:
> webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/
> OMElementImpl.java
> URL:
> http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/
> org/apache/axis2/om/impl/llom/OMElementImpl.java?rev=227034&r1=227033&r2=2
> 27034&view=diff
> ==========================================================================
> ====
> ---
> webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/
> OMElementImpl.java (original)
> +++
> webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/
> OMElementImpl.java Tue Aug  2 09:33:02 2005
> @@ -515,7 +515,8 @@
>       */
>      public void setFirstChild(OMNode firstChild) {
>          this.firstChild = firstChild;
> -        firstChild.setParent(this);
> +        if (firstChild != null)
> +            firstChild.setParent(this);
>      }
> 
>      /**
> 
> 




Mime
View raw message