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

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Tue, 18 Mar 2008 08:09:04 -0700

On Mar 18, 2008, at 5:19 AM, Stephan Koops wrote:

> Hello Paul,
>>> Dups doesn't matter. It's generally not defined for a Collection
>>> (see javadoc of Collection).
>> I know, that is the problem :-) what if one runtime chooses to use
>> HashSet as the underlying implementation for Collection and another
>> chooses to use ArrayList?
> I think that this is not a problem in general; the app should ready
> to handle this.
>> If we allow Collection we have to specify the policy on dups
>> otherwise it can cause interop issues where information is present
>> when using one runtime but potentially not when using another the
>> other.
> Ok, we could specify it. Than I propose to specify, that a List is
> injected.
Given that we need to specify this I don't see much point supporting
Collection. List is a Collection so you can use it anywhere you can
use a Collection. I think the contract wrt order and duplicates is
clearer if we just support List, Set and SortedSet.


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