DonalEvans commented on code in PR #7552:
URL: https://github.com/apache/geode/pull/7552#discussion_r842847511


##########
geode-for-redis/src/main/java/org/apache/geode/redis/internal/commands/executor/list/LInsertExecutor.java:
##########
@@ -39,10 +39,10 @@ public RedisResponse executeCommand(Command command, 
ExecutionHandlerContext con
     boolean before;
     byte[] referenceElement = commandElements.get(3);
     byte[] elementToInsert = commandElements.get(4);
-
-    if (Arrays.equals(direction, BEFORE)) {
+    String directionInUppercase = new String(direction).toUpperCase();

Review Comment:
   Rather than creating a new String here, line 38 should be 
   ```
   byte[] direction = toUpperCaseBytes(commandElements.get(2));
   ```
   The whole point of doing the byte array comparison with the constants from 
`StringBytesGlossary` is to avoid having to create a String.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@geode.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to