Skip to content

Commit

Permalink
Fix incorrect exception message
Browse files Browse the repository at this point in the history
- Thanks @hepin1989
  • Loading branch information
trustin committed Mar 22, 2013
1 parent e147615 commit 28576aa
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ class ReadOnlyDirectByteBuf extends AbstractReferenceCountedByteBuf {
public ReadOnlyDirectByteBuf(ByteBufAllocator allocator, ByteBuffer buffer) {
super(buffer.remaining());
if (!buffer.isDirect()) {
throw new IllegalArgumentException("buffer must be readOnly");
throw new IllegalArgumentException("must be a direct buffer: " + buffer.getClass().getSimpleName());
}

this.allocator = allocator;
this.buffer = buffer.slice().order(ByteOrder.BIG_ENDIAN);
writerIndex(buffer.limit());
Expand Down

0 comments on commit 28576aa

Please sign in to comment.