Fix return value validation

Fix argument in call to applyReturnValueValidation()
method in MethodValidationInterceptor.java. Method
argument was passed instead of the return value of the
method that was being validated.

See gh-33105
This commit is contained in:
vatsal
2024-06-26 20:00:01 -07:00
committed by rstoyanchev
parent 100da83913
commit 976b4f3533
2 changed files with 81 additions and 12 deletions

View File

@@ -174,7 +174,7 @@ public class MethodValidationInterceptor implements MethodInterceptor {
Object returnValue = invocation.proceed();
if (this.adaptViolations) {
this.validationAdapter.applyReturnValueValidation(target, method, null, arguments, groups);
this.validationAdapter.applyReturnValueValidation(target, method, null, returnValue, groups);
}
else {
violations = this.validationAdapter.invokeValidatorForReturnValue(target, method, returnValue, groups);