code: public static void requireValid(@NotNull final Validator validator, @NotNull final Object value, @Nullable final Class<?>... groups)
              throws ConstraintViolationException {
          // CHECKSTYLE:ON
  
          final Set<ConstraintViolation<Object>> constraintViolations = validator.validate(value);
          if (constraintViolations.size() > 0) {
              final StringBuffer sb = new StringBuffer();
              for (final ConstraintViolation<Object> constraintViolation : constraintViolations) {
                  if (sb.length() > 0) {
                      sb.append(", ");
                  }
                  sb.append("[" + constraintViolation.getPropertyPath() + "] " + constraintViolation.getMessage() + " {"
                          + constraintViolation.getInvalidValue() + "}");
              }
              throw new ConstraintViolationException(sb.toString(), constraintViolations);
          }
  
      }
docs: CHECKSTYLE:OFF:RedundantThrows