Fixed failing test

This commit is contained in:
Trustin Lee 2010-01-15 05:33:06 +00:00
parent 57bdb3a4a5
commit 8a8d1d1da6

View File

@ -794,8 +794,8 @@ public class ChannelBuffers {
private static ChannelBuffer copiedBuffer(ByteOrder endianness, CharBuffer buffer, Charset charset) {
CharBuffer src = buffer;
ByteBuffer dst = ChannelBuffers.encodeString(src, charset);
ChannelBuffer result = wrappedBuffer(endianness, dst.array(), 0, dst.remaining());
result.writerIndex(dst.position());
ChannelBuffer result = wrappedBuffer(endianness, dst.array());
result.writerIndex(dst.remaining());
return result;
}