You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by ga...@apache.org on 2001/04/24 06:15:29 UTC

cvs commit: xml-xalan/java/src/org/apache/xpath/objects XObject.java

garyp       01/04/23 21:15:28

  Modified:    java/src/org/apache/xpath/objects XObject.java
  Log:
  Resolve bugzilla bug 1015 <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1015>.
  Fix prevents null pointer exceptions when null non-XSLT arguments are
  passed to an extension function.
  
  Revision  Changes    Path
  1.9       +9 -2      xml-xalan/java/src/org/apache/xpath/objects/XObject.java
  
  Index: XObject.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/objects/XObject.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- XObject.java	2001/01/02 03:47:17	1.8
  +++ XObject.java	2001/04/24 04:15:27	1.9
  @@ -247,7 +247,7 @@
      */
     public String str()
     {
  -    return m_obj.toString();
  +    return (m_obj != null) ? m_obj.toString() : "null";
     }
   
     /**
  @@ -498,7 +498,14 @@
       if (obj2.getType() == XObject.CLASS_NODESET)
         return obj2.equals(this);
   
  -    return m_obj.equals(obj2.m_obj);
  +    if (null != m_obj)
  +    {
  +      return m_obj.equals(obj2.m_obj);
  +    }
  +    else
  +    {
  +      return obj2.m_obj == null;
  +    }
     }
   
     /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org