Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 47143 invoked from network); 6 Dec 2005 03:25:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 6 Dec 2005 03:25:27 -0000 Received: (qmail 85911 invoked by uid 500); 6 Dec 2005 03:25:22 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 85504 invoked by uid 500); 6 Dec 2005 03:25:21 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 85489 invoked by uid 500); 6 Dec 2005 03:25:21 -0000 Delivered-To: apmail-jakarta-tomcat-dev@jakarta.apache.org Received: (qmail 85486 invoked by uid 99); 6 Dec 2005 03:25:20 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Dec 2005 19:25:20 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 05 Dec 2005 19:25:20 -0800 Received: (qmail 47032 invoked by uid 65534); 6 Dec 2005 03:25:00 -0000 Message-ID: <20051206032500.47031.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r354271 - /tomcat/connectors/trunk/util/java/org/apache/tomcat/util/buf/MessageBytes.java Date: Tue, 06 Dec 2005 03:24:59 -0000 To: tomcat-dev@jakarta.apache.org From: billbarker@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org