Fix a bug in ByteChunk.indexOf(String, ...)
authorkkolinko <kkolinko@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 17 May 2010 16:28:44 +0000 (16:28 +0000)
committerkkolinko <kkolinko@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 17 May 2010 16:28:44 +0000 (16:28 +0000)
commit319004a73d8f475d96ffbccfb283a166fb79c3ef
tree35a07b019786a9f28bb4b6693f7c9b2ab54fbb69
parent59c03975c2f631af97047c52b7eecccc356978ca
Fix a bug in ByteChunk.indexOf(String, ...)

The problem is that the method could not find a string which length is 1,
as the only successful exit from the method was from inside the loop that
checks the second and subsequent characters.

I added the testcase for this in r945230.
In the test the bc.indexOf("o", 0, 1, 5) call returned -1, instead of 7.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@945231 13f79535-47bb-0310-9956-ffa450edef68
java/org/apache/tomcat/util/buf/ByteChunk.java