Skip to content

@RequestParam Optional<List<?>> not handling multiple params of the same name correctly [SPR-15857] #20412

Closed

Description

@spring-projects-issues

Cole Snodgrass opened SPR-15857 and commented

A @RequestParam Optional<List<String>> param will only return the first element if the param is specified multiple times in the query-string.

e.g.
?param=a,b,c will return the expected value but ?param=a&param=b&param=c will not

This is inconsistent with @RequestParam List<String>> param behavior. I have a workaround by using @RequestParam(required = false) List<String> param but this is not ideal.


Affects: 4.3.9

Reference URL: https://gist.github.com/cole-snodgrass/1e6270d4007841af8cff082e2aac8316

Issue Links:

Activity

  1. added
    type: bug
    status: duplicate
    in: web
    on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: webstatus: duplicate

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions