You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2002/04/30 15:40:34 UTC

DO NOT REPLY [Bug 8657] - java.lang.NullPointerException: XRTreeFrag.str(XRTreeFrag.java:280)

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8657>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8657

java.lang.NullPointerException: XRTreeFrag.str(XRTreeFrag.java:280)

kevin.ross@bredex.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |PatchAvailable



------- Additional Comments From kevin.ross@bredex.com  2002-04-30 13:40 -------
Found the code...it is potentially unsafe.  This may be a side effect of 
another underlying bug, but I guess we need to fix this one first.  This is 
patch code for the src distribution of 2.3.1

UNSAFE CODE:
------------
  public String str()
  {      
    String str = m_dtm.getStringValue(m_dtmRoot).toString();

    return (null == str) ? "" : str;
  }

SAFE CODE:
----------
  public String str()
  { 
    XMLString xmlString = m_dtm.getStringValue(m_dtmRoot);
    
    if( xmlString == null )
        return "";
    else
        return xmlString.toString();
  }