From 48f96b27b68c4afc08934514b01d0c5b4174e2b1 Mon Sep 17 00:00:00 2001 From: KIM MIN WOO <79193811+minwoo1999@users.noreply.github.com> Date: Mon, 16 Dec 2024 14:03:44 +0900 Subject: [PATCH] replace hardcoded GT and LT with CommandKeyword enum --- src/main/java/io/lettuce/core/ZAddArgs.java | 4 ++-- src/main/java/io/lettuce/core/protocol/CommandKeyword.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/io/lettuce/core/ZAddArgs.java b/src/main/java/io/lettuce/core/ZAddArgs.java index bba7c4e365..45c3ccdce2 100644 --- a/src/main/java/io/lettuce/core/ZAddArgs.java +++ b/src/main/java/io/lettuce/core/ZAddArgs.java @@ -182,11 +182,11 @@ public void build(CommandArgs args) { } if (gt) { - args.add("GT"); + args.add(GT); } if (lt) { - args.add("LT"); + args.add(LT); } if (ch) { diff --git a/src/main/java/io/lettuce/core/protocol/CommandKeyword.java b/src/main/java/io/lettuce/core/protocol/CommandKeyword.java index 597816edfe..c9d782afd8 100644 --- a/src/main/java/io/lettuce/core/protocol/CommandKeyword.java +++ b/src/main/java/io/lettuce/core/protocol/CommandKeyword.java @@ -49,7 +49,7 @@ public enum CommandKeyword implements ProtocolKeyword { MIGRATING, IMPORTING, SAVE, SKIPME, SLAVES, STREAM, STORE, SUM, SEGFAULT, SETUSER, TAKEOVER, TRACKING, TRACKINGINFO, TYPE, UNBLOCK, USERS, USAGE, WEIGHTS, WHOAMI, - WITHMATCHLEN, WITHSCORE, WITHSCORES, WITHVALUES, XOR, XX, YES, INDENT, NEWLINE, SPACE; + WITHMATCHLEN, WITHSCORE, WITHSCORES, WITHVALUES, XOR, XX, YES, INDENT, NEWLINE, SPACE, GT, LT; public final byte[] bytes;