public static void throwIf(final boolean condition, final CheckedSupplier<? extends Throwable> throwable) throws Throwable {
        if (condition) {
            throw throwable.get();
        }
    }
Throw if.

@param condition the condition
@param throwable the throwable
@throws Throwable the throwable
core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/function/FunctionUtils.java