From 580c6069fa37c0ad5ee45f04e7be83b2ee70ccbf Mon Sep 17 00:00:00 2001 From: Cruz Julian Bishop Date: Thu, 28 Jun 2012 10:31:49 +1000 Subject: [PATCH] Actually throw the correct Exception type. Whoops! This should be done, now. --- buffer/src/main/java/io/netty/buffer/CompositeByteBuf.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buffer/src/main/java/io/netty/buffer/CompositeByteBuf.java b/buffer/src/main/java/io/netty/buffer/CompositeByteBuf.java index a703a8ad79..67529302b3 100644 --- a/buffer/src/main/java/io/netty/buffer/CompositeByteBuf.java +++ b/buffer/src/main/java/io/netty/buffer/CompositeByteBuf.java @@ -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 "