[
https://issues.apache.org/jira/browse/CXF-2666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12831917#action_12831917
]
Sergey Beryozkin commented on CXF-2666:
---------------------------------------
I think returning an empty string is actually correct. Default value is used
when no query parameter with a given name exists.
?id=
and
?id
are equivalent, similarly to say
?wadl
and
?wadl=
I'll do some more checks but I'm pretty sure I'll end up closing this issue as
being invalid
> @QueryParam @DefaultValue does not return default value
> --------------------------------------------------------
>
> Key: CXF-2666
> URL: https://issues.apache.org/jira/browse/CXF-2666
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 2.2.5, 2.2.6
> Environment: mac OSX, jdk 1.6
> Reporter: michael Cheung
> Attachments: InjectionUtils.java
>
>
> When doing a HTTP GET /getFoo?id= to the resource below, the default value
> does not override the query parameter.
> @GET
> @Path("/getFoo")
> public Response getFoo(@QueryParam("id") @DefaultValue("-1") String gameId)
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.