|
|
|
@ -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);
|
|
|
|
|
}
|
|
|
|
|