[ 
https://issues.apache.org/jira/browse/WICKET-1512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12588325#action_12588325
 ] 

Igor Vaynberg commented on WICKET-1512:
---------------------------------------

i definitely do not like the two types on idataprovider. any mentioned 
transformation can occur as an iterator adapter returned from iterator() 
method. 99% of cases declaring idataprovider<person,person> will get incredibly 
annoying.

also widening i am not sure about. what is the usecase there? in order for 
widening to be needed you have to explicitly return a super-typed iterator. so 
why not properly declare the idataprovider type in the first place?

> Widen Generics for Lists/Iteratos
> ---------------------------------
>
>                 Key: WICKET-1512
>                 URL: https://issues.apache.org/jira/browse/WICKET-1512
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4-M1
>            Reporter: Johannes Schneider
>            Assignee: Igor Vaynberg
>             Fix For: 1.4-M1
>
>         Attachments: two_parameters.patch, 
> Widening_Generics_for_IDataProvider.patch
>
>
> It is important to widen the generics for collections.
> For example it is better (and sometimes necessary) to change the signature of 
>  org.apache.wicket.markup.repeater.data.IDataProvider#iterator to:
> Iterator<? extends T> iterator(int first, int count);
> I will create and add a patch later.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to