dcapwell commented on code in PR #4837:
URL: https://github.com/apache/cassandra/pull/4837#discussion_r3290987913


##########
src/java/org/apache/cassandra/utils/Hex.java:
##########
@@ -106,7 +106,12 @@ public static long parseLong(String hex, int start, int 
end)
         for (int i = start ; i < end ; ++i)
         {
             char c = hex.charAt(i);
-            result |= (long)(c - (c >= 'a' ? 'a' - 10 : '0')) << shift;

Review Comment:
   hex includes upper case but this method doesn't handle that.  This is fine 
in existing usage as we use `Long.toHexString(lsb);` which explicitly documents 
that its lower case only (if you want upper case it says to do `toUpperCase`). 
   
   So this bug fix isn't for any existing logic, but more defensive to make 
sure future logic works correctly



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to