public static <T> T checkNotNull(final T reference,
                                     final String errorMessageTemplate,
                                     final Object... errorMessageArgs) {
        if (Objects.isNull(reference)) {
            // If either of these parameters is null, the right thing happens anyway
            throw new NullPointerException(
                    format(errorMessageTemplate, errorMessageArgs));
        }
        return reference;
    }
checkNotNull.

@param reference reference
@param errorMessageTemplate errorMessageTemplate
@param errorMessageArgs errorMessageArgs
@param <T> t
@return {@link T}
shenyu-sdk/shenyu-sdk-core/src/main/java/org/apache/shenyu/sdk/core/util/Util.java