From 6acfa37a3c6c92d168c42ee3d2013102888191f0 Mon Sep 17 00:00:00 2001 From: Tihomir Mateev Date: Thu, 2 May 2024 10:24:55 +0300 Subject: [PATCH] Merge formatting issues + formatter using wrong configuration --- pom.xml | 4 +--- .../java/io/lettuce/core/AbstractRedisReactiveCommands.java | 2 +- .../core/cluster/pubsub/RedisClusterPubSubListener.java | 2 +- .../java/io/lettuce/core/pubsub/PubSubCommandBuilder.java | 4 ++-- .../java/io/lettuce/core/pubsub/RedisPubSubAdapter.java | 2 +- .../java/io/lettuce/core/RedisClientIntegrationTests.java | 6 ++---- 6 files changed, 8 insertions(+), 12 deletions(-) diff --git a/pom.xml b/pom.xml index 4d804cfa9a..20c34575a3 100644 --- a/pom.xml +++ b/pom.xml @@ -851,15 +851,13 @@ ${project.build.testSourceDirectory} ${project.basedir}/src/main/templates + formatting.xml validate - - formatting.xml - diff --git a/src/main/java/io/lettuce/core/AbstractRedisReactiveCommands.java b/src/main/java/io/lettuce/core/AbstractRedisReactiveCommands.java index 17c41035ad..16ae6c5796 100644 --- a/src/main/java/io/lettuce/core/AbstractRedisReactiveCommands.java +++ b/src/main/java/io/lettuce/core/AbstractRedisReactiveCommands.java @@ -2151,7 +2151,7 @@ public Flux spop(K key, long count) { public Mono spublish(K shardChannel, V message) { return createMono(() -> commandBuilder.spublish(shardChannel, message)); } - + @Override public Mono srandmember(K key) { return createMono(() -> commandBuilder.srandmember(key)); diff --git a/src/main/java/io/lettuce/core/cluster/pubsub/RedisClusterPubSubListener.java b/src/main/java/io/lettuce/core/cluster/pubsub/RedisClusterPubSubListener.java index 482453df7c..93da2f5313 100644 --- a/src/main/java/io/lettuce/core/cluster/pubsub/RedisClusterPubSubListener.java +++ b/src/main/java/io/lettuce/core/cluster/pubsub/RedisClusterPubSubListener.java @@ -75,7 +75,7 @@ public interface RedisClusterPubSubListener { * @param message Message. * @since 7.0 */ - default void smessage(RedisClusterNode node, K shardChannel, V message){ + default void smessage(RedisClusterNode node, K shardChannel, V message) { message(node, shardChannel, message); } diff --git a/src/main/java/io/lettuce/core/pubsub/PubSubCommandBuilder.java b/src/main/java/io/lettuce/core/pubsub/PubSubCommandBuilder.java index 8c486770ec..3da52d877f 100644 --- a/src/main/java/io/lettuce/core/pubsub/PubSubCommandBuilder.java +++ b/src/main/java/io/lettuce/core/pubsub/PubSubCommandBuilder.java @@ -102,7 +102,7 @@ Command spublish(K shardChannel, V message) { CommandArgs args = new CommandArgs<>(codec).addKey(shardChannel).addValue(message); return createCommand(SPUBLISH, new IntegerOutput<>(codec), args); } - + @SafeVarargs final Command ssubscribe(K... shardChannels) { LettuceAssert.notEmpty(shardChannels, "Shard channels " + MUST_NOT_BE_EMPTY); @@ -110,7 +110,7 @@ final Command ssubscribe(K... shardChannels) { CommandArgs args = new CommandArgs<>(codec).addKeys(shardChannels); return createCommand(SSUBSCRIBE, new PubSubOutput<>(codec), args); } - + @SafeVarargs final Command subscribe(K... channels) { LettuceAssert.notEmpty(channels, "Channels " + MUST_NOT_BE_EMPTY); diff --git a/src/main/java/io/lettuce/core/pubsub/RedisPubSubAdapter.java b/src/main/java/io/lettuce/core/pubsub/RedisPubSubAdapter.java index 828a85743f..8b061bacf0 100644 --- a/src/main/java/io/lettuce/core/pubsub/RedisPubSubAdapter.java +++ b/src/main/java/io/lettuce/core/pubsub/RedisPubSubAdapter.java @@ -60,7 +60,7 @@ public void punsubscribed(K pattern, long count) { } @Override - public void smessage(K shardChannel, V message) { + public void smessage(K shardChannel, V message) { // empty adapter method } diff --git a/src/test/java/io/lettuce/core/RedisClientIntegrationTests.java b/src/test/java/io/lettuce/core/RedisClientIntegrationTests.java index 123c8d29f3..42c411f7a9 100644 --- a/src/test/java/io/lettuce/core/RedisClientIntegrationTests.java +++ b/src/test/java/io/lettuce/core/RedisClientIntegrationTests.java @@ -139,10 +139,8 @@ void shouldPropagateCommandTimeoutToCommandListener() throws InterruptedExceptio assertThat(commandListener.succeeded).isEmpty(); Wait.untilTrue(() -> commandListener.failed.size() == 1); - Wait.untilTrue(() -> - commandListener.failed.stream().anyMatch(command -> - command.getCommand().getType().equals(CommandType.BLPOP))); - + Wait.untilTrue(() -> commandListener.failed.stream() + .anyMatch(command -> command.getCommand().getType().equals(CommandType.BLPOP))); FastShutdown.shutdown(client); }