Author: remm
Date: Wed Nov 22 07:41:42 2006
New Revision: 478196

URL: http://svn.apache.org/viewvc?view=rev&rev=478196
Log:
- Made setString(null) do the same thing it used to do when recycle was called 
at the beginning of the method.

Modified:
    tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/buf/MessageBytes.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/buf/MessageBytes.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/buf/MessageBytes.java?view=diff&rev=478196&r1=478195&r2=478196
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/buf/MessageBytes.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/buf/MessageBytes.java Wed 
Nov 22 07:41:42 2006
@@ -183,15 +183,18 @@
      * 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 --------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to