You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Sergey Beryozkin (JIRA)" <ji...@apache.org> on 2010/10/03 23:07:32 UTC

[jira] Resolved: (CXF-2986) sets null instead of empty List/Set/SortedSet when value isn't in query string

     [ https://issues.apache.org/jira/browse/CXF-2986?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sergey Beryozkin resolved CXF-2986.
-----------------------------------

    Fix Version/s: 2.3
                   2.2.11
       Resolution: Fixed

> sets null instead of empty List/Set/SortedSet when value isn't in query string
> ------------------------------------------------------------------------------
>
>                 Key: CXF-2986
>                 URL: https://issues.apache.org/jira/browse/CXF-2986
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.2.10
>            Reporter: Brad Cupit
>            Priority: Minor
>             Fix For: 2.3, 2.2.11
>
>
> CXF sets a null collection, rather than an empty one, when the query param isn't in the request
> Example:
>     @GET
>     @Path("/stuff")
>     public Response get(@QueryParam("option") Set<String> options) { ... }
> and http://localhost:8080/stuff is called (but ?option=abc is not on the query string), then options will be null, but it should be an empty Set
> The javadocs in @DefaultValue says:
> If this annotation is not used and the corresponding metadata is not present in the request, the value will be an empty collection for List, Set or SortedSet
> this seems similar to CXF-1675

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.