mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
9ddab9e69b
Prior to this commit, when Web MVC attempted to resolve a constructor argument for a data class constructor with @ModelAttribute binding, ModelAttributeMethodProcessor failed to unwrap the array returned by WebRequest.getParameter(String). According to the Javadoc for WebRequest.getParameter(String), "a single-value parameter will be exposed as an array with a single element." This commit fixes this issue by extracting the single value from such an array and using that as the constructor argument (potentially converted by the WebDataBinder). Closes gh-25200