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(