Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-2986

sets null instead of empty List/Set/SortedSet when value isn't in query string

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.2.10
    • 2.3, 2.2.11
    • JAX-RS
    • None

    Description

      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

      Attachments

        Activity

          People

            Unassigned Unassigned
            bradcupit Brad Cupit
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: