refactoring

pull/5708/head^2
Nikita Koksharov 11 months ago
parent 92ac6c5a17
commit 8aa38c5dc3

@ -474,15 +474,12 @@ public class CommandAsyncService implements CommandAsyncExecutor {
return connectionManager.getServiceManager().getCfg().isUseScriptCache();
}
protected Object[] copy(Object[] params) {
List<Object> result = new ArrayList<>();
protected final Object[] copy(Object[] params) {
List<Object> result = new ArrayList<>(params.length);
for (Object object : params) {
if (object instanceof ByteBuf) {
ByteBuf b = (ByteBuf) object;
ByteBuf nb = ByteBufAllocator.DEFAULT.buffer(b.readableBytes());
int ri = b.readerIndex();
nb.writeBytes(b);
b.readerIndex(ri);
ByteBuf nb = b.copy();
result.add(nb);
} else {
result.add(object);

Loading…
Cancel
Save