From c32df371abcbee7ebbb77e6bf6a429d3f3f4134b Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Thu, 31 May 2012 01:55:30 -0700 Subject: [PATCH] Fix compilation errors --- .../java/io/netty/buffer/ByteBufferBackedChannelBuffer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buffer/src/main/java/io/netty/buffer/ByteBufferBackedChannelBuffer.java b/buffer/src/main/java/io/netty/buffer/ByteBufferBackedChannelBuffer.java index f0106183ef..76980e7267 100644 --- a/buffer/src/main/java/io/netty/buffer/ByteBufferBackedChannelBuffer.java +++ b/buffer/src/main/java/io/netty/buffer/ByteBufferBackedChannelBuffer.java @@ -145,7 +145,7 @@ public class ByteBufferBackedChannelBuffer extends AbstractChannelBuffer { tmpBuf.clear().position(index).limit(index + length); } catch (IllegalArgumentException e) { throw new IndexOutOfBoundsException("Too many bytes to read - Need " - + (index + length) + ", maximum is " + data.limit()); + + (index + length) + ", maximum is " + buffer.limit()); } tmpBuf.get(dst, dstIndex, length); } @@ -157,7 +157,7 @@ public class ByteBufferBackedChannelBuffer extends AbstractChannelBuffer { tmpBuf.clear().position(index).limit(index + bytesToCopy); } catch (IllegalArgumentException e) { throw new IndexOutOfBoundsException("Too many bytes to read - Need " - + (index + bytesToCopy) + ", maximum is " + data.limit()); + + (index + bytesToCopy) + ", maximum is " + buffer.limit()); } dst.put(tmpBuf); }