virajjasani commented on code in PR #7584:
URL: https://github.com/apache/hbase/pull/7584#discussion_r2674515481


##########
hbase-common/src/main/java/org/apache/hadoop/hbase/util/Bytes.java:
##########
@@ -1694,10 +1694,23 @@ public static byte[] add(final byte[] a, final byte[] 
b) {
    * @return New array made from a, b and c
    */
   public static byte[] add(final byte[] a, final byte[] b, final byte[] c) {
-    byte[] result = new byte[a.length + b.length + c.length];
+    return add(a, b, c, EMPTY_BYTE_ARRAY);
+  }
+
+  /**
+   * Concatenate byte arrays.
+   * @param a first fourth
+   * @param b second fourth
+   * @param c third fourth
+   * @param d fourth fourth
+   * @return New array made from a, b, c, and d
+   */
+  public static byte[] add(final byte[] a, final byte[] b, final byte[] c, 
final byte[] d) {

Review Comment:
   No worries, for now we can add note in the javadoc that if any use case 
needs more than 4 bytes, divide and use any of the existing utilities. So that 
in future, no one keeps adding more variants.



-- 
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]

Reply via email to