tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: svn commit: r944918 - /tomcat/trunk/java/org/apache/tomcat/util/buf/ByteChunk.java
Date Mon, 17 May 2010 10:35:49 GMT
2010/5/17 Mark Thomas <markt@apache.org>:
> On 17/05/2010 10:47, Konstantin Kolinko wrote:
>> 2010/5/17 Mark Thomas <markt@apache.org>:
>>> On 17/05/2010 09:49, Konstantin Kolinko wrote:
>>>> findChar() was the "correct" implementation.
>>>> It is indexOf() that is 0-127.
>>>
>>> We could fix that but given the current usage, I am happy with just
>>> supporting 0-127.
>>>
>>
>> I am happy with the old code:
>> - indexOf() supporting 0-127,
>>  as it is only used to search for chars like '%', '=', '&' which are
>> 0-127, --- I agree with you.
>> - I think findChar() should still support 0-255 as it did.
>
> findChar() was the only method that used a narrowing conversion and it
> was never used.
>
> findChars() and both indexOf() methods supported 0-127.
>
> Given findChar() was never used and the intended usage of these methods,
> I'd rather that findChar() was consistent with the other methods.
>

There are findChars() and findNotChars() that receive byte[] argument
and thus are supporting the full ISO-8859-1 range. The findChar() is
consistent with them, but not with the family of indexOf() methods.


I cannot say for sure what the intended usage of findChar() is.  Given
that the method was not used, we can remove those find* methods
(though I do not see much benefit from removing),  but I do not like
changing its behaviour.


Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message