Skip to content

Commit

Permalink
Spotless
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Carbonetto <[email protected]>
  • Loading branch information
acarbonetto committed Mar 23, 2024
1 parent 4e0483a commit edf08d9
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 18 deletions.
4 changes: 1 addition & 3 deletions java/client/src/main/java/glide/api/BaseClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -602,8 +601,7 @@ public CompletableFuture<String> xadd(
@NonNull String key, @NonNull Map<String, String> 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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -1268,11 +1267,11 @@ public T xadd(@NonNull String key, @NonNull Map<String, String> values) {
* options.makeStream</code> is set to <code>false</code> and no stream with the matching
* <code>key</code> exists.
*/
public T xadd(@NonNull String key, @NonNull Map<String, String> values, @NonNull StreamAddOptions options) {
public T xadd(
@NonNull String key, @NonNull Map<String, String> 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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ public final class StreamAddOptions {

public abstract static class StreamTrimOptions {
/**
* If <code>true</code>, the stream will be trimmed exactly. Equivalent to <code>=</code> in the Redis API. Otherwise,
* the stream will be trimmed in a near-exact manner, which is more efficient, equivalent to <code>~</code>
* in the Redis API.
* If <code>true</code>, the stream will be trimmed exactly. Equivalent to <code>=</code> in the
* Redis API. Otherwise, the stream will be trimmed in a near-exact manner, which is more
* efficient, equivalent to <code>~</code> in the Redis API.
*/
protected Boolean exact;

Expand Down
16 changes: 8 additions & 8 deletions java/client/src/test/java/glide/api/models/TransactionTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit edf08d9

Please sign in to comment.