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
This commit is contained in:
@@ -1027,10 +1027,11 @@ public class LettuceConnection extends AbstractRedisConnection {
|
||||
|
||||
private void validateCommand(ProtocolKeyword cmd, @Nullable byte[]... args) {
|
||||
|
||||
RedisCommand redisCommand = RedisCommand.failsafeCommandLookup(cmd.name());
|
||||
if (!RedisCommand.UNKNOWN.equals(redisCommand) && redisCommand.requiresArguments()) {
|
||||
RedisCommand command = RedisCommand.failsafeCommandLookup(cmd.name());
|
||||
|
||||
if (!RedisCommand.UNKNOWN.equals(command) && command.requiresArguments()) {
|
||||
try {
|
||||
redisCommand.validateArgumentCount(args != null ? args.length : 0);
|
||||
command.validateArgumentCount(args != null ? args.length : 0);
|
||||
} catch (IllegalArgumentException ex) {
|
||||
String message = String.format("Validation failed for %s command", command);
|
||||
throw new InvalidDataAccessApiUsageException(message, ex);
|
||||
|
||||
Reference in New Issue
Block a user