From: remm Date: Wed, 22 Nov 2006 15:41:42 +0000 (+0000) Subject: - Made setString(null) do the same thing it used to do when recycle was called at... X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=be6acf458ebba20123656c1fc2c133e1a4890639;p=tomcat7.0 - 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 --- 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 --------------------