From a06810609ba3954a3ec43bf26bbb407710621579 Mon Sep 17 00:00:00 2001 From: Michael Nitschinger Date: Mon, 9 Dec 2013 08:06:09 +0100 Subject: [PATCH] codec-memcache: No need to allocate a buffer if no extra is used. --- .../codec/memcache/binary/DefaultBinaryMemcacheRequest.java | 4 ++-- .../codec/memcache/binary/DefaultBinaryMemcacheResponse.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/codec-memcache/src/main/java/io/netty/handler/codec/memcache/binary/DefaultBinaryMemcacheRequest.java b/codec-memcache/src/main/java/io/netty/handler/codec/memcache/binary/DefaultBinaryMemcacheRequest.java index ffb0d80090..3cf9332690 100644 --- a/codec-memcache/src/main/java/io/netty/handler/codec/memcache/binary/DefaultBinaryMemcacheRequest.java +++ b/codec-memcache/src/main/java/io/netty/handler/codec/memcache/binary/DefaultBinaryMemcacheRequest.java @@ -30,7 +30,7 @@ public class DefaultBinaryMemcacheRequest extends AbstractBinaryMemcacheMessage< * @param header the header to use. */ public DefaultBinaryMemcacheRequest(BinaryMemcacheRequestHeader header) { - this(header, null, Unpooled.EMPTY_BUFFER); + this(header, null, null); } /** @@ -40,7 +40,7 @@ public class DefaultBinaryMemcacheRequest extends AbstractBinaryMemcacheMessage< * @param key the key to use. */ public DefaultBinaryMemcacheRequest(BinaryMemcacheRequestHeader header, String key) { - this(header, key, Unpooled.EMPTY_BUFFER); + this(header, key, null); } /** diff --git a/codec-memcache/src/main/java/io/netty/handler/codec/memcache/binary/DefaultBinaryMemcacheResponse.java b/codec-memcache/src/main/java/io/netty/handler/codec/memcache/binary/DefaultBinaryMemcacheResponse.java index d871e89a21..4c58c4fb33 100644 --- a/codec-memcache/src/main/java/io/netty/handler/codec/memcache/binary/DefaultBinaryMemcacheResponse.java +++ b/codec-memcache/src/main/java/io/netty/handler/codec/memcache/binary/DefaultBinaryMemcacheResponse.java @@ -30,7 +30,7 @@ public class DefaultBinaryMemcacheResponse extends AbstractBinaryMemcacheMessage * @param header the header to use. */ public DefaultBinaryMemcacheResponse(BinaryMemcacheResponseHeader header) { - this(header, null, Unpooled.EMPTY_BUFFER); + this(header, null, null); } /** @@ -40,7 +40,7 @@ public class DefaultBinaryMemcacheResponse extends AbstractBinaryMemcacheMessage * @param key the key to use */ public DefaultBinaryMemcacheResponse(BinaryMemcacheResponseHeader header, String key) { - this(header, key, Unpooled.EMPTY_BUFFER); + this(header, key, null); } /**