public static int[] clone(int[] array) {
        int[] clone = new int[array.length];
        System.arraycopy(array, 0, clone, 0, array.length);
        return clone;
    }
Copy an array of ints.

@param array         The input array.
@return              A copy of the array.
metadata/src/main/java/org/apache/kafka/metadata/Replicas.java