From 88833d9ded6949e03de3a98ccff67c67b2c6e551 Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Mon, 25 Aug 2008 11:45:13 +0000 Subject: [PATCH] Fixed issue: NETTY-29 (ChannelBufferInputStream.readFully(byte[], int, int) should throw IndexOutOfBoundsException.) * ChannelBufferInputstream.checkAvailable() throws IndexOutOfBoundsException instead of IllegalArgumentException now. --- .../java/org/jboss/netty/buffer/ChannelBufferInputStream.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/jboss/netty/buffer/ChannelBufferInputStream.java b/src/main/java/org/jboss/netty/buffer/ChannelBufferInputStream.java index 980a594d0f..10ec5d4570 100644 --- a/src/main/java/org/jboss/netty/buffer/ChannelBufferInputStream.java +++ b/src/main/java/org/jboss/netty/buffer/ChannelBufferInputStream.java @@ -232,7 +232,7 @@ public class ChannelBufferInputStream extends InputStream implements DataInput { private void checkAvailable(int fieldSize) throws IOException { if (fieldSize < 0) { - throw new IllegalArgumentException(); + throw new IndexOutOfBoundsException(); } if (fieldSize > available()) { throw new EOFException();