private static Object copyArrayGrow1(Object array, Class<?> newArrayComponentType) {
        if (array != null) {
            int arrayLength = Array.getLength(array);
            Object newArray = Array.newInstance(array.getClass().getComponentType(), arrayLength + 1);
            System.arraycopy(array, 0, newArray, 0, arrayLength);
            return newArray;
        }
        return Array.newInstance(newArrayComponentType, 1);
    }
Returns a copy of the given array of size 1 greater than the argument.
The last value of the array is left to the default value.

@param array The array to copy, must not be {@code null}.
@param newArrayComponentType If {@code array} is {@code null}, create a
size 1 array of this type.
@return A new copy of the array of size 1 greater than the input.
android/android_framework/base/src/main/java/lang3/ArrayUtils.java