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
Request params Optional<List<String> and List<String> are inconsistent [SPR-15676] #20235
in: webIssues in web modules (web, webmvc, webflux, websocket)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug
When using List<String> as the request parameter, both key=val1,val2 and key=val1&key=val2 end up mapping to key = [val1, val2]
When using Optional<List<String>> as the request parameter
key=val1,val2 maps to key = Optional([val1,val2])
but key=val1&key=val2 maps to Optional([val1])
This makes RequestParam(..., required = false) List<String> behave differently from RequestParam(...) Optional<List<String>>, which seems unfortunate.
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 Jun 16, 2017
Ayush Kumar commented
Linked to #17997
spring-projects-issues commentedon Sep 20, 2017
Juergen Hoeller commented
This turns out to be addressed by the fix for #20473. I've added dedicated tests for regular parameter values as well now.