public static int add(final int... values) {
        if (values == null || values.length < 2) {
            throw new IllegalArgumentException("You must provide at least two elements to be added");
        }
        return Arrays.stream(values).reduce(0, Math::addExact);
    }
Applies {@link Math#addExact(int, int)} to a variable length array of integers.

@param values variable length array of integers.
@return the values safely added.
src/main/java/org/apache/commons/imaging/internal/SafeOperations.java