public static ConnectException maybeWrap(Throwable t, String message) {
        if (t == null) {
            return null;
        }
        if (t instanceof ConnectException) {
            return (ConnectException) t;
        }
        return new ConnectException(message, t);
    }
Apply a specified transformation {@link Function} to every value in a Map.
@param map the Map to be transformed
@param transformation the transformation function
@return the transformed Map
@param <K> the key type
@param <I> the pre-transform value type
@param <O> the post-transform value type
connect/runtime/src/main/java/org/apache/kafka/connect/util/ConnectUtils.java