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) { private static ChannelBuffer copiedBuffer(ByteOrder endianness, CharBuffer buffer, Charset charset) {
CharBuffer src = buffer; CharBuffer src = buffer;
ByteBuffer dst = ChannelBuffers.encodeString(src, charset); ByteBuffer dst = ChannelBuffers.encodeString(src, charset);
ChannelBuffer result = wrappedBuffer(endianness, dst.array(), 0, dst.remaining()); ChannelBuffer result = wrappedBuffer(endianness, dst.array());
result.writerIndex(dst.position()); result.writerIndex(dst.remaining());
return result; return result;
} }