Skip to content

MultipartResolutionDelegate in Servlet 2.5 environments not working correctly [SPR-14461] #19030

@spring-projects-issues

Description

@spring-projects-issues

Tobias Ahlers opened SPR-14461 and commented

As described in #18930 the MultipartResolutionDelegate has some Problems because the servletPartClass is not available (null) in Servlet 2.5 environments.

After closing #18930 I still got problems because the Method resolveMultipartArgument is called and is returning null due to

else if (isPartCollection(parameter)) {
     return (isMultipart ? RequestPartResolver.resolvePartList(request, name) : null);
}

and

private static boolean isPartCollection(MethodParameter methodParam) {
	return (servletPartClass == getCollectionParameterType(methodParam));
}

The caller (RequestParamMethodArgumentResolver) seems to expect the constant MultipartResolutionDelegate.UNRESOLVABLE instead of null:

Object mpArg = MultipartResolutionDelegate.resolveMultipartArgument(name, parameter, servletRequest);
if (mpArg != MultipartResolutionDelegate.UNRESOLVABLE) {
	return mpArg;
}

Maybe another solution approach is to always return MultipartResolutionDelegate.UNRESOLVABLE instead of null?


Affects: 4.3.1

Issue Links:

Referenced from: commits 70e666b

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions