return descriptor != null && descriptor.hasConstrainedParameters();
}
public void validate(@Observes ReadyToExecuteMethod event, ControllerInstance controllerInstance,
MethodInfo methodInfo, Validator validator) {
ControllerMethod controllerMethod = event.getControllerMethod();
if (hasConstraints(controllerMethod)) {
Set<ConstraintViolation<Object>> violations = bvalidator.forExecutables().validateParameters(
controllerInstance.getController(), controllerMethod.getMethod(), methodInfo.getParametersValues());
logger.debug("there are {} violations at method {}.", violations.size(), controllerMethod);
for (ConstraintViolation<Object> v : violations) {
BeanValidatorContext ctx = new BeanValidatorContext(v);