Merge branch 'master' of github.com:redisson/redisson

pull/4799/head
Nikita Koksharov 2 years ago
commit 814cd2854a

@ -31,10 +31,7 @@
*/
package org.redisson.client.handler;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufAllocator;
import io.netty.buffer.ByteBufUtil;
import io.netty.buffer.Unpooled;
import io.netty.buffer.*;
import io.netty.channel.ChannelHandler.Sharable;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelPromise;
@ -117,6 +114,9 @@ public class CommandEncoder extends MessageToByteEncoder<CommandData<?, ?>> {
}
private ByteBuf encode(Object in) {
if (in == null) {
return new EmptyByteBuf(ByteBufAllocator.DEFAULT);
}
if (in instanceof byte[]) {
return Unpooled.wrappedBuffer((byte[]) in);
}

Loading…
Cancel
Save