public static String[] toStringArray(Collection<String> collection) {
        if (collection == null) {
            return null;
        }
        return collection.toArray(new String[collection.size()]);
    }
Copy the given Collection into a String array.
The Collection must contain String elements only.

@param collection the Collection to copy
@return the String array ({@code null} if the passed-in
Collection was {@code null})
src/main/java/spark/utils/StringUtils.java