Copilot commented on code in PR #7218: URL: https://github.com/apache/hbase/pull/7218#discussion_r2270256791
########## hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/SimpleTotalOrderPartitioner.java: ########## @@ -76,28 +62,21 @@ public static void setEndKey(Configuration conf, byte[] endKey) { conf.set(END_BASE64, Bytes.toString(Base64.getEncoder().encode(endKey))); } - @SuppressWarnings("deprecation") static byte[] getStartKey(Configuration conf) { - return getKeyFromConf(conf, START_BASE64, START); + return getKeyFromConf(conf, START_BASE64); } - @SuppressWarnings("deprecation") static byte[] getEndKey(Configuration conf) { - return getKeyFromConf(conf, END_BASE64, END); + return getKeyFromConf(conf, END_BASE64); } - private static byte[] getKeyFromConf(Configuration conf, String base64Key, String deprecatedKey) { + private static byte[] getKeyFromConf(Configuration conf, String base64Key) { String encoded = conf.get(base64Key); if (encoded != null) { return Base64.getDecoder().decode(encoded); - } - String oldStyleVal = conf.get(deprecatedKey); - if (oldStyleVal == null) { + } else { return null; } Review Comment: [nitpick] The else clause can be simplified since it only contains a return null statement. Consider removing the else and just using 'return null;' at the end of the method for better readability. ```suggestion } return null; ``` ########## hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/SimpleTotalOrderPartitioner.java: ########## @@ -76,28 +62,21 @@ public static void setEndKey(Configuration conf, byte[] endKey) { conf.set(END_BASE64, Bytes.toString(Base64.getEncoder().encode(endKey))); } - @SuppressWarnings("deprecation") static byte[] getStartKey(Configuration conf) { - return getKeyFromConf(conf, START_BASE64, START); + return getKeyFromConf(conf, START_BASE64); } - @SuppressWarnings("deprecation") static byte[] getEndKey(Configuration conf) { - return getKeyFromConf(conf, END_BASE64, END); + return getKeyFromConf(conf, END_BASE64); } - private static byte[] getKeyFromConf(Configuration conf, String base64Key, String deprecatedKey) { + private static byte[] getKeyFromConf(Configuration conf, String base64Key) { Review Comment: [nitpick] The method signature change removes the deprecatedKey parameter but the method name 'getKeyFromConf' is now misleading since it only handles Base64 keys. Consider renaming to 'getBase64KeyFromConf' or 'getDecodedKeyFromConf' to better reflect its current purpose. -- 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: issues-unsubscr...@hbase.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org