Fixed NETTY-320 ReplayingDecoderBuffer.toByteBuffer(int, int) throws java.lang.IndexOutOfBoundsException
* Added missing checkIndex() call
This commit is contained in:
parent
a55a1c6e72
commit
3a92fb8a9e
@ -15,10 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
package org.jboss.netty.handler.codec.replay;
|
package org.jboss.netty.handler.codec.replay;
|
||||||
|
|
||||||
import org.jboss.netty.buffer.ChannelBuffer;
|
|
||||||
import org.jboss.netty.buffer.ChannelBufferFactory;
|
|
||||||
import org.jboss.netty.buffer.ChannelBufferIndexFinder;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
@ -28,6 +24,10 @@ import java.nio.channels.GatheringByteChannel;
|
|||||||
import java.nio.channels.ScatteringByteChannel;
|
import java.nio.channels.ScatteringByteChannel;
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
|
|
||||||
|
import org.jboss.netty.buffer.ChannelBuffer;
|
||||||
|
import org.jboss.netty.buffer.ChannelBufferFactory;
|
||||||
|
import org.jboss.netty.buffer.ChannelBufferIndexFinder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
* @author <a href="http://www.jboss.org/netty/">The Netty Project</a>
|
||||||
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
* @author <a href="http://gleamynode.net/">Trustin Lee</a>
|
||||||
@ -551,6 +551,7 @@ class ReplayingDecoderBuffer implements ChannelBuffer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ByteBuffer toByteBuffer(int index, int length) {
|
public ByteBuffer toByteBuffer(int index, int length) {
|
||||||
|
checkIndex(index, length);
|
||||||
return buffer.toByteBuffer(index, length);
|
return buffer.toByteBuffer(index, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user