constraintViolations.addAll( methodValidator.validateParameters( clazz, method, arguments, groups ) );
if ( !constraintViolations.isEmpty() )
{
throw getException( new ConstraintViolationException( format( "Validation error when calling method '%s' with arguments %s",
method,
deepToString( arguments ) ),
constraintViolations ),
validate.rethrowExceptionsAs(),
validate.exceptionMessage(),
arguments );
}
Object returnedValue = invocation.proceed();
if ( validate.validateReturnedValue() )
{
constraintViolations.addAll( methodValidator.validateReturnedValue( clazz, method, returnedValue, groups ) );
if ( !constraintViolations.isEmpty() )
{
throw getException( new ConstraintViolationException( format( "Method '%s' returned a not valid value %s",
method,
returnedValue ),
constraintViolations ),
validate.rethrowExceptionsAs(),
validate.exceptionMessage(),