axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/encoding/ser SimpleDeserializer.java
Date Tue, 18 Feb 2003 06:02:00 GMT
jmsnell     2003/02/17 22:02:00

  Modified:    java/src/org/apache/axis/encoding/ser
                        SimpleDeserializer.java
  Log:
  FIX http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11945
  
  Applying the patch submitted by Dave Marquard 
  (modified so that deleted lines are commented out)
  
  Revision  Changes    Path
  1.31      +9 -4      xml-axis/java/src/org/apache/axis/encoding/ser/SimpleDeserializer.java
  
  Index: SimpleDeserializer.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/encoding/ser/SimpleDeserializer.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- SimpleDeserializer.java	11 Dec 2002 22:38:15 -0000	1.30
  +++ SimpleDeserializer.java	18 Feb 2003 06:02:00 -0000	1.31
  @@ -69,6 +69,7 @@
   import org.xml.sax.SAXException;
   
   import javax.xml.namespace.QName;
  +import java.io.CharArrayWriter;
   import java.lang.reflect.Constructor;
   import java.lang.reflect.InvocationTargetException;
   import java.util.HashMap;
  @@ -87,7 +88,8 @@
    */
   public class SimpleDeserializer extends DeserializerImpl {
   
  -    StringBuffer val = new StringBuffer();
  +    //StringBuffer val = new StringBuffer(); -- FIX http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11945
  +    private final CharArrayWriter val = new CharArrayWriter();
       private Constructor constructor = null;
       private Map propertyMap = null;
       private HashMap attributeMap = null;
  @@ -147,7 +149,8 @@
        * Reset deserializer for re-use
        */
       public void reset() {
  -        val.setLength(0); // Reset string buffer back to zero
  +        //val.setLength(0); // Reset string buffer back to zero -- FIX http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11945
  +        val.reset();
           attributeMap = null; // Remove attribute map
           isNil = false; // Don't know if nil
           isEnded = false; // Indicate the end of element not yet called
  @@ -194,7 +197,8 @@
       public void characters(char [] chars, int start, int end)
           throws SAXException
       {
  -        val.append(chars, start, end);
  +        //val.append(chars, start, end); -- FIX http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11945
  +        val.write(chars,start,end);
       }
       
       /**
  @@ -205,7 +209,8 @@
                              DeserializationContext context)
           throws SAXException
       {
  -        if (isNil || val == null) {
  +        //if (isNil || val == null) {  -- FIX http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11945
  +        if (isNil) {
               value = null;
               return;
           }
  
  
  

Mime
View raw message