commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@apache.org
Subject cvs commit: jakarta-commons/digester/src/java/org/apache/commons/digester Digester.java
Date Wed, 14 Nov 2001 20:42:05 GMT
craigmcc    01/11/14 12:42:04

  Modified:    digester/src/java/org/apache/commons/digester Digester.java
  Log:
  Of course, immediately after the last commit I figured out a way to avoid
  the problem of multiple bodyText values stepping on each other, without
  paying the price of doing StringBuffer->String and String->StringBuffer
  conversions ...
  
  Revision  Changes    Path
  1.27      +7 -7      jakarta-commons/digester/src/java/org/apache/commons/digester/Digester.java
  
  Index: Digester.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/Digester.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- Digester.java	2001/11/14 20:38:24	1.26
  +++ Digester.java	2001/11/14 20:42:04	1.27
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/Digester.java,v
1.26 2001/11/14 20:38:24 craigmcc Exp $
  - * $Revision: 1.26 $
  - * $Date: 2001/11/14 20:38:24 $
  + * $Header: /home/cvs/jakarta-commons/digester/src/java/org/apache/commons/digester/Digester.java,v
1.27 2001/11/14 20:42:04 craigmcc Exp $
  + * $Revision: 1.27 $
  + * $Date: 2001/11/14 20:42:04 $
    *
    * ====================================================================
    *
  @@ -108,7 +108,7 @@
    *
    * @author Craig McClanahan
    * @author Scott Sanders
  - * @version $Revision: 1.26 $ $Date: 2001/11/14 20:38:24 $
  + * @version $Revision: 1.27 $ $Date: 2001/11/14 20:42:04 $
    */
   
   public class Digester extends DefaultHandler {
  @@ -750,7 +750,7 @@
           }
   
   	// Recover the body text from the surrounding element
  -	bodyText = new StringBuffer((String) bodyTexts.pop());
  +	bodyText = (StringBuffer) bodyTexts.pop();
           if (debug >= 4)
               log("  Popping body text '" + bodyText.toString() + "'");
   
  @@ -920,10 +920,10 @@
                   qName + ")");
   
   	// Save the body text accumulated for our surrounding element
  -	bodyTexts.push(bodyText.toString());
  +	bodyTexts.push(bodyText);
           if (debug >= 4)
               log("  Pushing body text '" + bodyText.toString() + "'");
  -	bodyText.setLength(0);
  +	bodyText = new StringBuffer();
   
   	// Compute the current matching rule
           StringBuffer sb = new StringBuffer(match);
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message