Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 53612 invoked from network); 17 May 2010 07:51:05 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 17 May 2010 07:51:05 -0000 Received: (qmail 92108 invoked by uid 500); 17 May 2010 07:51:04 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 91965 invoked by uid 500); 17 May 2010 07:51:04 -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 91956 invoked by uid 99); 17 May 2010 07:51:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 May 2010 07:51:03 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [193.252.22.191] (HELO smtp6.freeserve.com) (193.252.22.191) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 May 2010 07:50:54 +0000 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf3619.me.freeserve.com (SMTP Server) with ESMTP id 01EFC7000115 for ; Mon, 17 May 2010 09:50:34 +0200 (CEST) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf3619.me.freeserve.com (SMTP Server) with ESMTP id E659F7000116 for ; Mon, 17 May 2010 09:50:33 +0200 (CEST) Received: from mail.homeinbox.net (unknown [91.109.180.115]) by mwinf3619.me.freeserve.com (SMTP Server) with ESMTP id C2EC87000115 for ; Mon, 17 May 2010 09:50:33 +0200 (CEST) X-ME-UUID: 20100517075033798.C2EC87000115@mwinf3619.me.freeserve.com Received: from localhost (localhost [127.0.0.1]) by mail.homeinbox.net (Postfix) with ESMTP id DCF3B32ABC for ; Mon, 17 May 2010 08:51:22 +0100 (BST) X-Virus-Scanned: Debian amavisd-new at homeinbox.net Received: from mail.homeinbox.net ([127.0.0.1]) by localhost (mail.homeinbox.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IOCuWyuk+dlv for ; Mon, 17 May 2010 08:51:20 +0100 (BST) Received: from [192.168.0.9] (study03.dev.local [192.168.0.9]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.homeinbox.net (Postfix) with ESMTPSA id 3373B32AB8 for ; Mon, 17 May 2010 08:51:20 +0100 (BST) Message-ID: <4BF0F545.2010509@apache.org> Date: Mon, 17 May 2010 08:50:29 +0100 From: Mark Thomas User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-GB; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 MIME-Version: 1.0 To: Tomcat Developers List Subject: Re: svn commit: r944918 - /tomcat/trunk/java/org/apache/tomcat/util/buf/ByteChunk.java References: <20100516213157.85C4623888FE@eris.apache.org> In-Reply-To: X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On 17/05/2010 00:03, Konstantin Kolinko wrote: > 2010/5/17 : >> Author: markt >> Date: Sun May 16 21:31:57 2010 >> New Revision: 944918 >> >> URL: http://svn.apache.org/viewvc?rev=944918&view=rev >> Log: >> Code clean-up >> >> Modified: >> tomcat/trunk/java/org/apache/tomcat/util/buf/ByteChunk.java >> > >> + public static int indexOf(byte bytes[], int start, int end, char c) { >> + return findChar(bytes, start, end, c); >> } > > There is a difference in behaviour between ByteChunk#indexOf(..) and > ByteChunk#findChar(..) how they were implemented before this change. > > indexOf() relied on (byte == char) comparison, which performs widening. > findChar() does byte b=(byte)c; and compares bytes. > > The difference is that indexOf() can find ASCII (0-127) characters > only, while findChar() can find any ISO-8859-1 char. Thanks for the catch. I'll restore the original behaviour and add some comments to make this clearer. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org