users@jsr311.java.net

Re: _at_DefaultValue

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Thu, 03 Apr 2008 14:02:06 -0400

On Apr 3, 2008, at 10:23 AM, Dianne Jiao wrote:
>
> When @DefaultValue is set, for example in @QueryParam:
>
> @GET
> public String getParam(@QueryParam("stringtest")
> @DefaultValue("abc") String stringheader){...}
>
>
> does it mean that stringheader takes the @DefaultValue,
> when it is not set
>
> http://host:port/querytest
>
>
> or when it is set with no value:
>
> http://host:port/querytest?stringtest
>
I think that the former would use the default value, the latter would
result in "".

Marc.

---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.