Fixed issue: NETTY-29 (ChannelBufferInputStream.readFully(byte[], int, int) should throw IndexOutOfBoundsException.)
* ChannelBufferInputstream.checkAvailable() throws IndexOutOfBoundsException instead of IllegalArgumentException now.
This commit is contained in:
parent
a4edbd444e
commit
88833d9ded
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user