From 249f6f2da5766f6437cde0debb2ac85bf70a5c99 Mon Sep 17 00:00:00 2001 From: shin-mallang Date: Wed, 6 Sep 2023 04:44:11 +0900 Subject: [PATCH] Polish resolveArgument method in RequestResponseBodyMethodProcessor Closes gh-31175 --- .../method/annotation/RequestResponseBodyMethodProcessor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessor.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessor.java index 6fa7c574b5ec..65f62dd71757 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessor.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessor.java @@ -134,9 +134,9 @@ public Object resolveArgument(MethodParameter parameter, @Nullable ModelAndViewC parameter = parameter.nestedIfOptional(); Object arg = readWithMessageConverters(webRequest, parameter, parameter.getNestedGenericParameterType()); - String name = Conventions.getVariableNameForParameter(parameter); if (binderFactory != null) { + String name = Conventions.getVariableNameForParameter(parameter); WebDataBinder binder = binderFactory.createBinder(webRequest, arg, name); if (arg != null) { validateIfApplicable(binder, parameter);