From 2c7ed5e5f1d475d6f2168dd958460c8b03180319 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Tue, 17 Feb 2026 12:15:07 +0100 Subject: [PATCH] Align validation groups check with InvocableHandlerMethod in spring-web Closes gh-36337 --- .../web/reactive/result/method/InvocableHandlerMethod.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/InvocableHandlerMethod.java b/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/InvocableHandlerMethod.java index 5f2d5e95e72..3107bc0e384 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/InvocableHandlerMethod.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/InvocableHandlerMethod.java @@ -149,7 +149,7 @@ public class InvocableHandlerMethod extends HandlerMethod { /** * Configure a reactive adapter registry. This is needed for cases where the response is * fully handled within the controller in combination with an async void return value. - *

By default this is a {@link ReactiveAdapterRegistry} with default settings. + *

By default, this is a {@link ReactiveAdapterRegistry} with default settings. */ public void setReactiveAdapterRegistry(ReactiveAdapterRegistry registry) { this.reactiveAdapterRegistry = registry; @@ -163,7 +163,7 @@ public class InvocableHandlerMethod extends HandlerMethod { */ public void setMethodValidator(@Nullable MethodValidator methodValidator) { this.methodValidator = methodValidator; - this.validationGroups = (methodValidator != null ? + this.validationGroups = (methodValidator != null && (shouldValidateArguments() || shouldValidateReturnValue()) ? methodValidator.determineValidationGroups(getBean(), getBridgedMethod()) : EMPTY_GROUPS); }