public static List<Integer> toList(int[] array) {
        if (array == null) return null;
        List<Integer> list = new ArrayList<>(array.length);
        for (int i : array) {
            list.add(i);
        }
        return list;
    }
Convert an array of integers to a list of ints.

@param array         The input array.
@return              The output list.
metadata/src/main/java/org/apache/kafka/metadata/Replicas.java