You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2006/11/22 16:41:42 UTC

svn commit: r478196 - /tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/buf/MessageBytes.java

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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org