From edf08d9517d9350f4f49173ad54e0de060353061 Mon Sep 17 00:00:00 2001 From: Andrew Carbonetto Date: Fri, 22 Mar 2024 18:12:31 -0700 Subject: [PATCH] Spotless Signed-off-by: Andrew Carbonetto --- .../src/main/java/glide/api/BaseClient.java | 4 +--- .../java/glide/api/models/BaseTransaction.java | 7 +++---- .../api/models/commands/StreamAddOptions.java | 6 +++--- .../java/glide/api/models/TransactionTests.java | 16 ++++++++-------- 4 files changed, 15 insertions(+), 18 deletions(-) diff --git a/java/client/src/main/java/glide/api/BaseClient.java b/java/client/src/main/java/glide/api/BaseClient.java index 5eeba1ef96..53c639ceca 100644 --- a/java/client/src/main/java/glide/api/BaseClient.java +++ b/java/client/src/main/java/glide/api/BaseClient.java @@ -70,7 +70,6 @@ import glide.managers.BaseCommandResponseResolver; import glide.managers.CommandManager; import glide.managers.ConnectionManager; -import glide.utils.ArrayTransformUtils; import java.util.Map; import java.util.Set; import java.util.concurrent.CompletableFuture; @@ -602,8 +601,7 @@ public CompletableFuture xadd( @NonNull String key, @NonNull Map values, @NonNull StreamAddOptions options) { String[] arguments = ArrayUtils.addAll( - ArrayUtils.addFirst(options.toArgs(), key), - convertMapToKeyValueStringArray(values)); + ArrayUtils.addFirst(options.toArgs(), key), convertMapToKeyValueStringArray(values)); return commandManager.submitNewCommand(XAdd, arguments, this::handleStringOrNullResponse); } } diff --git a/java/client/src/main/java/glide/api/models/BaseTransaction.java b/java/client/src/main/java/glide/api/models/BaseTransaction.java index 4494af36be..33f22943e8 100644 --- a/java/client/src/main/java/glide/api/models/BaseTransaction.java +++ b/java/client/src/main/java/glide/api/models/BaseTransaction.java @@ -63,7 +63,6 @@ import glide.api.models.commands.SetOptions.SetOptionsBuilder; import glide.api.models.commands.StreamAddOptions; import glide.api.models.commands.ZaddOptions; -import glide.utils.ArrayTransformUtils; import java.util.Map; import lombok.Getter; import lombok.NonNull; @@ -1268,11 +1267,11 @@ public T xadd(@NonNull String key, @NonNull Map values) { * options.makeStream is set to false and no stream with the matching * key exists. */ - public T xadd(@NonNull String key, @NonNull Map values, @NonNull StreamAddOptions options) { + public T xadd( + @NonNull String key, @NonNull Map values, @NonNull StreamAddOptions options) { String[] arguments = ArrayUtils.addAll( - ArrayUtils.addFirst(options.toArgs(), key), - convertMapToKeyValueStringArray(values)); + ArrayUtils.addFirst(options.toArgs(), key), convertMapToKeyValueStringArray(values)); ArgsArray commandArgs = buildArgs(arguments); protobufTransaction.addCommands(buildCommand(XAdd, commandArgs)); return getThis(); diff --git a/java/client/src/main/java/glide/api/models/commands/StreamAddOptions.java b/java/client/src/main/java/glide/api/models/commands/StreamAddOptions.java index fe682d5db9..3e13441fc9 100644 --- a/java/client/src/main/java/glide/api/models/commands/StreamAddOptions.java +++ b/java/client/src/main/java/glide/api/models/commands/StreamAddOptions.java @@ -38,9 +38,9 @@ public final class StreamAddOptions { public abstract static class StreamTrimOptions { /** - * If true, the stream will be trimmed exactly. Equivalent to = in the Redis API. Otherwise, - * the stream will be trimmed in a near-exact manner, which is more efficient, equivalent to ~ - * in the Redis API. + * If true, the stream will be trimmed exactly. Equivalent to = in the + * Redis API. Otherwise, the stream will be trimmed in a near-exact manner, which is more + * efficient, equivalent to ~ in the Redis API. */ protected Boolean exact; diff --git a/java/client/src/test/java/glide/api/models/TransactionTests.java b/java/client/src/test/java/glide/api/models/TransactionTests.java index 744b14b687..2aae473da6 100644 --- a/java/client/src/test/java/glide/api/models/TransactionTests.java +++ b/java/client/src/test/java/glide/api/models/TransactionTests.java @@ -376,14 +376,14 @@ public void transaction_builds_protobuf_request(BaseTransaction transaction) transaction.xadd("key", Map.of("field1", "foo1")); results.add( - Pair.of( - XAdd, - ArgsArray.newBuilder() - .addArgs("key") - .addArgs("*") - .addArgs("field1") - .addArgs("foo1") - .build())); + Pair.of( + XAdd, + ArgsArray.newBuilder() + .addArgs("key") + .addArgs("*") + .addArgs("field1") + .addArgs("foo1") + .build())); transaction.xadd("key", Map.of("field1", "foo1"), StreamAddOptions.builder().id("id").build()); results.add(