Empty query parameter leads to collection of null
Author: dsvenssonCreated Aug 27, 2020Updated Dec 6, 2025
Labelsbugblocked
Consider the following endpoint:
@GET
fun listStuff(@QueryParam("id") ids: Set<UUID>): List<Stuff> {
...
}When issuing curl http://localhost/liststuff?id= .. that is, id without a value. The Set<UUID> ids will be a set that contains one null item.
I've tried adding @NotEmpty Set<UUID>, and Set<@NotNull UUID> and various permutations, without getting the endpoint to reject the request.
Is this a known limitation or am I missing something?
Source: dropwizard/dropwizard