after removing the "? extends" it will... // THIS WORKS: List<Integer> list1 = new ArrayList<Integer>(); list1.add(new Integer(4)); list1.add(4);
// THIS DOES NOT WORK: List<? extends Integer> list2 = new ArrayList<? extends Integer>(); list2.add(new Integer(4)); list2.add(4); -- Jeremy Thomerson http://www.wickettraining.com On Fri, Mar 13, 2009 at 12:50 AM, Igor Vaynberg <igor.vaynb...@gmail.com>wrote: > palette needs to be able to do: > > getmodelobject().clear(); > getmodelobject().add(item); > > where getmodelobject should return a collection. > > will that still work with this refactor? i dont see why components > that do this need to cast anything to make it work. > > -igor > > On Thu, Mar 12, 2009 at 10:43 PM, James Carman > <jcar...@carmanconsulting.com> wrote: > > To be clear, the only potential for breakage is where user code tries > > to modify the returned "model object" (of type List<? extends T>) > > without casting it. However, that's a rare usecase (in my opinion) > > and again it's easily overcome by a simple cast. > > > > On Thu, Mar 12, 2009 at 5:10 PM, Igor Vaynberg <igor.vaynb...@gmail.com> > wrote: > >> before applying an api-breaking patch to an rc release we should have > >> a vote on the dev list. > >> > >> -igor > >> > >> On Thu, Mar 12, 2009 at 12:59 PM, Jeremy Thomerson > >> <jer...@wickettraining.com> wrote: > >>> Unless I'm seeing double - this patch has two problems: > >>> > >>> 1 - It is the opposite of what was voted on. The vote was to make > >>> IModel<List<? extends E>> into IModel<List<E>>. Your patch makes it > >>> IModel<? extends List<? extends E>>. > >>> > >>> 2 - The patch causes compile errors that were not fixed. > >>> > >>> I have unassigned myself from the task until those issues are addressed > or I > >>> have time to create my own patch. The best solution would be for > someone to > >>> submit a proper patch that fixes the two problems above or explain to > me > >>> what I missed. > >>> > >>> Thanks! > >>> > >>> -- > >>> Jeremy Thomerson > >>> http://www.wickettraining.com > >>> > >>> > >>> > >>> On Thu, Mar 12, 2009 at 2:53 PM, Jeremy Thomerson < > jer...@wickettraining.com > >>>> wrote: > >>> > >>>> I'm reviewing it now. Assuming that it looks fine, and is line with > what > >>>> was proposed by the vote thread earlier, I will apply. The vote > passed, so > >>>> I don't see a reason not to. I'm not sure how many were binding / > >>>> non-binding, but there were eight for, two against. > >>>> > >>>> -- > >>>> Jeremy Thomerson > >>>> http://www.wickettraining.com > >>>> > >>>> > >>>> > >>>> > >>>> On Thu, Mar 12, 2009 at 9:52 AM, Brill Pappin <br...@pappin.ca> > wrote: > >>>> > >>>>> https://issues.apache.org/jira/browse/WICKET-2137 > >>>>> > >>>>> - Brill > >>>>> > >>>>> --------------------------------------------------------------------- > >>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > >>>>> For additional commands, e-mail: users-h...@wicket.apache.org > >>>>> > >>>>> > >>>> > >>> > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > >> For additional commands, e-mail: users-h...@wicket.apache.org > >> > >> > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >