- Made setString(null) do the same thing it used to do when recycle was called at...
authorremm <remm@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 22 Nov 2006 15:41:42 +0000 (15:41 +0000)
committerremm <remm@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 22 Nov 2006 15:41:42 +0000 (15:41 +0000)
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

index 7329a4c..bae356e 100644 (file)
@@ -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 --------------------