xalan-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mm...@apache.org
Subject cvs commit: xml-xalan/java/src/org/apache/xalan/transformer ResultTreeHandler.java
Date Wed, 12 Sep 2001 20:05:12 GMT
mmidy       01/09/12 13:05:12

  Modified:    java/src/org/apache/xalan/transformer ResultTreeHandler.java
  Log:
  Bug 2130: Check for null data to avoid NPE
  
  Revision  Changes    Path
  1.47      +7 -2      xml-xalan/java/src/org/apache/xalan/transformer/ResultTreeHandler.java
  
  Index: ResultTreeHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/transformer/ResultTreeHandler.java,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- ResultTreeHandler.java	2001/08/10 16:21:10	1.46
  +++ ResultTreeHandler.java	2001/09/12 20:05:12	1.47
  @@ -498,9 +498,14 @@
         m_snapshot.m_currentNode = node;
   
       String data = node.getNodeValue();
  -    char [] ch = data.toCharArray();
  -    int length = data.length();
  +    char [] ch = null;
  +    int length = 0;
  +    if (data != null)
  +    {
  +    ch = data.toCharArray();
  +    length = data.length();
       m_contentHandler.characters(ch, 0, length);
  +    }
       
       if (null != m_tracer)
       {
  
  
  

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


Mime
View raw message