dev@jsr311.java.net

Re: JSR311: _at_*Param and List<?>

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Mon, 17 Mar 2008 15:33:00 -0700

On Mar 17, 2008, at 3:16 PM, Stephan Koops wrote:
>
> @Marc: +1.
> I think it is useful to allow also Set and SortedSet. Sometimes the
> order is irrelevant and/or dublicates could or should be ignored for
> the app. I propose also to allow Collection.

OK.

>
> What, if no parameter "bar" could be read from the query and no
> @DefaultValue is given? Empty collection or null? I think an empty
> collection is, but this should be defined.

+1 to empty collection.

>
> Is the collection allowed to be modifiable? I think, it should be
> unmodifiable.
>
+1 to read-only.

Marc.


>
> Stefan Tilkov schrieb:
>> On Mar 17, 2008, at 6:55 PM, Marc Hadley wrote:
>>> I propose to change the parameter types that can be annotated with
>>> @*Param to include List. E.g. you could do:
>>>
>>> @GET
>>> Foo getFoo(@QueryParam("bar") List<String> bars) {...}
>> My apologies if this is a dumb question, but what would the URI
>> look like? Multiple bar=... query params?
>>
>> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_jsr311.dev.java.net
> For additional commands, e-mail: dev-help_at_jsr311.dev.java.net
>

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