Fix buffer leaks in Bzip2DecoderTest

This commit is contained in:
Trustin Lee 2014-06-24 16:46:56 +09:00
parent 448b0105b4
commit bf85af5743

View File

@ -186,9 +186,11 @@ public class Bzip2DecoderTest {
ByteBuf msg;
while ((msg = channel.readInbound()) != null) {
uncompressed.writeBytes(msg);
msg.release();
}
final byte[] result = new byte[uncompressed.readableBytes()];
uncompressed.readBytes(result);
uncompressed.release();
assertArrayEquals(data, result);
}