Failure to resolve @RequestMapping method arguments in Servlet 2.5 environments [SPR-14358] #18930
Comments
Juergen Hoeller commented Good catch! Fixed for 4.3.1 now. |
Francisco Lozano commented Was about to report it, we were just hit by this. In our case, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dmitri Gabbasov opened SPR-14358 and commented
Given the following bean configuration:
and the following controller:
and using them in a Servlet 2.5 environment (e.g. Tomcat 6) will result in the following exception when a request is made to
/home
:This only occurs when Spring chooses to use the
RequestMappingHandlerAdapter
(as opposed to the deprecatedAnnotationMethodHandlerAdapter
).The root cause of this seems to be in the (somewhat recent)
MultipartResolutionDelegate
class. ItsservletPartClass
field remainsnull
in pre Servlet 3.0 environments, and some equality checks yield false positives due to that. For instance:getCollectionParameterType
returnsnull
for non-collection parameters, which makesisPartCollection
returntrue
. TheisPartArray
method is plagued by the same issue (and maybe other places are too).Affects: 4.3 GA
Issue Links:
Referenced from: commits dcb2c73
The text was updated successfully, but these errors were encountered: