Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.util.List contains null if query param doesn't specified #1806

Closed
extbe opened this issue Jun 21, 2020 · 0 comments
Closed

java.util.List contains null if query param doesn't specified #1806

extbe opened this issue Jun 21, 2020 · 0 comments
Milestone

Comments

@extbe
Copy link
Contributor

extbe commented Jun 21, 2020

Hi!

I'm trying to receive values of a query parameter as java.util.List in my MVC controller

@Path("/")
public class Controller {

  @GET
  public String sayHi(@QueryParam List<String> names) {
    return "Welcome to Jooby!";
  }
}

But if I send a request without specifying the parameter, the names list will contain one element - null

@extbe extbe changed the title java.util.List with null if query param doesn't specified java.util.List contains null if query param doesn't specified Jun 21, 2020
@jknack jknack added this to the 2.8.8 milestone Jun 21, 2020
@jknack jknack closed this as completed in f58e433 Jun 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants