Actually throw the correct Exception type. Whoops!

This should be done, now.
This commit is contained in:
Cruz Julian Bishop 2012-06-28 10:31:49 +10:00 committed by Trustin Lee
parent 0d8ed47c3e
commit 580c6069fa

View File

@ -575,7 +575,7 @@ public class CompositeByteBuf extends AbstractByteBuf {
dst.writerIndex(dst.capacity());
}
public ByteBuf getBufferFor(int index) throws IOException {
public ByteBuf getBufferFor(int index) throws IndexOutOfBoundsException {
if (index < 0 || index > capacity()) {
throw new IndexOutOfBoundsException("Invalid index: " + index
+ " - Bytes needed: " + (index) + ", maximum is "