Skip to content

Commit 8fefea7

Browse files
committed
Fix compilation failure in LettuceConnection.
Compilation failure was caused by a missing local variable declaration ('command', which was declared as 'redisCommand') on line 1036. Closes #2756
1 parent a0ddc0e commit 8fefea7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/java/org/springframework/data/redis/connection/lettuce/LettuceConnection.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -1027,10 +1027,11 @@ private void validateCommandIfRunningInTransactionMode(ProtocolKeyword cmd, byte
10271027

10281028
private void validateCommand(ProtocolKeyword cmd, @Nullable byte[]... args) {
10291029

1030-
RedisCommand redisCommand = RedisCommand.failsafeCommandLookup(cmd.name());
1031-
if (!RedisCommand.UNKNOWN.equals(redisCommand) && redisCommand.requiresArguments()) {
1030+
RedisCommand command = RedisCommand.failsafeCommandLookup(cmd.name());
1031+
1032+
if (!RedisCommand.UNKNOWN.equals(command) && command.requiresArguments()) {
10321033
try {
1033-
redisCommand.validateArgumentCount(args != null ? args.length : 0);
1034+
command.validateArgumentCount(args != null ? args.length : 0);
10341035
} catch (IllegalArgumentException ex) {
10351036
String message = String.format("Validation failed for %s command", command);
10361037
throw new InvalidDataAccessApiUsageException(message, ex);

0 commit comments

Comments
 (0)