From be6acf458ebba20123656c1fc2c133e1a4890639 Mon Sep 17 00:00:00 2001 From: remm Date: Wed, 22 Nov 2006 15:41:42 +0000 Subject: [PATCH] - Made setString(null) do the same thing it used to do when recycle was called at the beginning of the method. git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@478196 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/tomcat/util/buf/MessageBytes.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/java/org/apache/tomcat/util/buf/MessageBytes.java b/java/org/apache/tomcat/util/buf/MessageBytes.java index 7329a4cfd..bae356e01 100644 --- a/java/org/apache/tomcat/util/buf/MessageBytes.java +++ b/java/org/apache/tomcat/util/buf/MessageBytes.java @@ -183,15 +183,18 @@ public final class MessageBytes implements Cloneable, Serializable { * Set the content to be a string */ public void setString( String s ) { - if (s == null) - return; strValue=s; - hasStrValue=true; hasHashCode=false; hasIntValue=false; hasLongValue=false; hasDateValue=false; - type=T_STR; + if (s == null) { + hasStrValue=false; + type=T_NULL; + } else { + hasStrValue=true; + type=T_STR; + } } // -------------------- Conversion and getters -------------------- -- 2.11.0