Fixed issue: NETTY-123 couple of errors in ReplayingDecoderBuffer.java

* Fixed a problem where ReplayingDecoderBuffer.indexOf ignores the specified parameters
This commit is contained in:
Trustin Lee 2009-02-09 00:50:41 +00:00
parent 0f5d16def8
commit 9445fd1b6f

View File

@ -178,7 +178,7 @@ class ReplayingDecoderBuffer implements ChannelBuffer {
}
public int indexOf(int fromIndex, int toIndex, byte value) {
int endIndex = buffer.indexOf(buffer.readerIndex(), buffer.writerIndex(), value);
int endIndex = buffer.indexOf(fromIndex, toIndex, value);
if (endIndex < 0) {
throw REPLAY;
}
@ -187,7 +187,7 @@ class ReplayingDecoderBuffer implements ChannelBuffer {
public int indexOf(int fromIndex, int toIndex,
ChannelBufferIndexFinder indexFinder) {
int endIndex = buffer.indexOf(buffer.readerIndex(), buffer.writerIndex(), indexFinder);
int endIndex = buffer.indexOf(fromIndex, toIndex, indexFinder);
if (endIndex < 0) {
throw REPLAY;
}