Author: billbarker
Date: Mon Dec 5 19:24:56 2005
New Revision: 354271
URL: http://svn.apache.org/viewcvs?rev=354271&view=rev
Log:
Don't claim that we have a string value until we actually do.
This only makes a difference for a rogue webapp, but we need to be able to deal
with them as well ;-).
Based on patch Submitted By: Doug Rand
Fix for Bug #37803
Modified:
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/MessageBytes.java
Modified:
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/MessageBytes.java
URL:
http://svn.apache.org/viewcvs/tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/MessageBytes.java?rev=354271&r1=354270&r2=354271&view=diff
==============================================================================
---
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/MessageBytes.java
(original)
+++
tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/MessageBytes.java
Mon Dec 5 19:24:56 2005
@@ -198,18 +198,19 @@
/** Compute the string value
*/
public String toString() {
- if( hasStrValue ) return strValue;
- hasStrValue=true;
-
- switch (type) {
- case T_CHARS:
- strValue=charC.toString();
- return strValue;
- case T_BYTES:
- strValue=byteC.toString();
- return strValue;
- }
- return null;
+ if( hasStrValue ) return strValue;
+
+ switch (type) {
+ case T_CHARS:
+ strValue=charC.toString();
+ hasStrValue=true;
+ return strValue;
+ case T_BYTES:
+ strValue=byteC.toString();
+ hasStrValue=true;
+ return strValue;
+ }
+ return null;
}
//----------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]