private BiConsumer<ConstraintViolation<? extends T>, ValidationSeverity> buildFilteringConsumer(
                final ValidationSeverity requiredSeverity,
                final Consumer<ConstraintViolation<? extends T>> errorConsumer) {
            Objects.requireNonNull(requiredSeverity);

            return (constraintViolation, severity) -> {
                if (requiredSeverity.equals(severity)) {
                    errorConsumer.accept(constraintViolation);
                }
            };
        }
The passed errorConsumer is called for each WARNING violation in the result set. If there are no
errors the consumer will not be called.
stroom-util/src/main/java/stroom/util/config/ConfigValidator.java