diff --git a/plugins/riot/src/main/java/com/redis/riot/AbstractCompareCommand.java b/plugins/riot/src/main/java/com/redis/riot/AbstractCompareCommand.java index 3610349f6..b063d17e1 100644 --- a/plugins/riot/src/main/java/com/redis/riot/AbstractCompareCommand.java +++ b/plugins/riot/src/main/java/com/redis/riot/AbstractCompareCommand.java @@ -50,7 +50,11 @@ public abstract class AbstractCompareCommand extends AbstractReplicateCommand { private KeyValueProcessorArgs processorArgs = new KeyValueProcessorArgs(); protected ItemProcessor, KeyValue> processor() { - return RiotUtils.processor(new KeyValueFilter<>(ByteArrayCodec.INSTANCE, log), keyValueProcessor()); + return RiotUtils.processor(keyValueFilter(), keyValueProcessor()); + } + + private KeyValueFilter> keyValueFilter() { + return new KeyValueFilter<>(ByteArrayCodec.INSTANCE, log); } protected abstract boolean isStruct();