Fix RedisCommand.requiresArguments for zero argument length.

Closes #2646
Original Pull Request: #2647
This commit is contained in:
John Blum
2023-07-17 16:04:45 -07:00
committed by Christoph Strobl
parent 59a7266ff7
commit e5cec58a40
2 changed files with 24 additions and 3 deletions

View File

@@ -257,8 +257,8 @@ public enum RedisCommand {
private final boolean read;
private final boolean write;
private final int minArgs;
private final int maxArgs;
final int minArgs;
final int maxArgs;
private final @Nullable String alias;
@@ -313,7 +313,7 @@ public enum RedisCommand {
* @return {@literal true} if the command requires arguments
*/
public boolean requiresArguments() {
return minArgs >= 0;
return minArgs > 0;
}
/**