You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2020/01/10 14:28:19 UTC

[GitHub] [zookeeper] belugabehr commented on a change in pull request #1213: ZOOKEEPER-3685: Use JDK Arrays Equals for Jute

belugabehr commented on a change in pull request #1213: ZOOKEEPER-3685: Use JDK Arrays Equals for Jute
URL: https://github.com/apache/zookeeper/pull/1213#discussion_r365258716
 
 

 ##########
 File path: zookeeper-jute/src/main/java/org/apache/jute/Utils.java
 ##########
 @@ -30,32 +30,6 @@ private Utils() {
         super();
     }
 
-    /**
-     * equals function that actually compares two buffers.
-     *
-     * @param onearray First buffer
-     * @param twoarray Second buffer
-     * @return true if one and two contain exactly the same content, else false.
-     */
-    public static boolean bufEquals(byte[] onearray, byte[] twoarray) {
-        if (onearray == twoarray) {
-            return true;
-        }
-
-        boolean ret = (onearray.length == twoarray.length);
-
-        if (!ret) {
-            return ret;
-        }
-
-        for (int idx = 0; idx < onearray.length; idx++) {
-            if (onearray[idx] != twoarray[idx]) {
-                return false;
-            }
-        }
-        return true;
-    }
-
     public static int compareBytes(byte[] b1, int off1, int len1, byte[] b2, int off2, int len2) {
 
 Review comment:
   @eolivelli I don't think the group of folks here is quite large enough to be supporting mult-version releases.  I think it's best just to focus on getting everything up to JDK 1.8 spec first and then continue to increment JDK versions over time.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services