From 93a5bf22ec497c3fa17f3bfd7ca0b745953db593 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Mon, 24 Apr 2023 13:51:05 +0200 Subject: [PATCH] Polishing #2395 Original pull request: #2396 --- .../cluster/RedisAdvancedClusterReactiveCommandsImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/io/lettuce/core/cluster/RedisAdvancedClusterReactiveCommandsImpl.java b/src/main/java/io/lettuce/core/cluster/RedisAdvancedClusterReactiveCommandsImpl.java index 176d186267..d969e26cb8 100644 --- a/src/main/java/io/lettuce/core/cluster/RedisAdvancedClusterReactiveCommandsImpl.java +++ b/src/main/java/io/lettuce/core/cluster/RedisAdvancedClusterReactiveCommandsImpl.java @@ -32,8 +32,6 @@ import org.reactivestreams.Publisher; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; import io.lettuce.core.*; import io.lettuce.core.api.StatefulRedisConnection; import io.lettuce.core.api.reactive.RedisKeyReactiveCommands; @@ -49,6 +47,8 @@ import io.lettuce.core.output.KeyStreamingChannel; import io.lettuce.core.output.KeyValueStreamingChannel; import io.lettuce.core.protocol.ConnectionIntent; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; /** * An advanced reactive and thread-safe API to a Redis Cluster connection. @@ -333,7 +333,7 @@ public Mono mget(KeyValueStreamingChannel channel, Iterable keys) publishers.add(super.mget(channel, entry.getValue())); } - return Flux.merge(publishers).reduce((accu, next) -> accu + next); + return Flux.merge(publishers).reduce(Long::sum); } @Override