You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Second call to MVC handler method with Optional parameter fails with argument type mismatch [SPR-13755] #18328
in: webIssues in web modules (web, webmvc, webflux, websocket)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug
For the first request, the argument type is correctly resolved as java.util.Optional. The second time it's resolved as a MultipartFile. A possible side-effect of the first resolution setting the HandlerMethodParameter's parameter type so the second resolution is using different inputs?
Indeed, its the interaction with GenericTypeResolver.resolveParameterType which breaks it: There is a missing check for the top nesting level there, accidentally exposing a nested parameter type as cached top-level parameter type.
The underlying bug also affects 4.1.x, so I'm backporting that change to 4.1.9 as well.
in: webIssues in web modules (web, webmvc, webflux, websocket)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug
Activity
spring-projects-issues commentedon Dec 3, 2015
Juergen Hoeller commented
Indeed, its the interaction with
GenericTypeResolver.resolveParameterTypewhich breaks it: There is a missing check for the top nesting level there, accidentally exposing a nested parameter type as cached top-level parameter type.The underlying bug also affects 4.1.x, so I'm backporting that change to 4.1.9 as well.
Juergen
spring-projects-issues commentedon Dec 14, 2015
Juergen Hoeller commented
Andy Wilkinson, does a recent
4.2.4.BUILD-SNAPSHOTwork here? Could you please (re-)run that Boot repro app just to double-check?Juergen
spring-projects-issues commentedon Dec 14, 2015
Andy Wilkinson commented
Looks good. The repro passes against Boot 1.3.1.BUILD-SNAPSHOT which is using Spring Framework 4.2.4.BUILD-SNAPSHOT.