readableBytes() ==0 -> !isReadable()

This commit is contained in:
Trustin Lee 2013-12-06 13:29:46 +09:00
parent d31a3e4120
commit 0ff98c98e2

View File

@ -50,7 +50,7 @@ public abstract class BinaryMemcacheEncoder<M extends BinaryMemcacheMessage<H>,
* @param extras the extras to encode.
*/
private static void encodeExtras(ByteBuf buf, ByteBuf extras) {
if (extras == null || extras.readableBytes() == 0) {
if (extras == null || !extras.isReadable()) {
return;
}