Index: C:/Programme/Eclipse32/workspace/tomcat6/java/org/apache/tomcat/util/buf/MessageBytes.java =================================================================== --- C:/Programme/Eclipse32/workspace/tomcat6/java/org/apache/tomcat/util/buf/MessageBytes.java (revision 514070) +++ C:/Programme/Eclipse32/workspace/tomcat6/java/org/apache/tomcat/util/buf/MessageBytes.java (working copy) @@ -42,10 +42,10 @@ /** getType() is T_STR if the the object used to create the MessageBytes was a String */ public static final int T_STR = 1; - /** getType() is T_STR if the the object used to create the MessageBytes + /** getType() is T_BYTES if the the object used to create the MessageBytes was a byte[] */ public static final int T_BYTES = 2; - /** getType() is T_STR if the the object used to create the MessageBytes + /** getType() is T_CHARS if the the object used to create the MessageBytes was a char[] */ public static final int T_CHARS = 3; @@ -128,6 +128,7 @@ */ public void setBytes(byte[] b, int off, int len) { byteC.setBytes( b, off, len ); + charC.recycle(); type=T_BYTES; hasStrValue=false; hasHashCode=false; @@ -158,6 +159,7 @@ */ public void setChars( char[] c, int off, int len ) { charC.setChars( c, off, len ); + byteC.recycle(); type=T_CHARS; hasStrValue=false; hasHashCode=false;