You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martijn Dashorst (JIRA)" <ji...@apache.org> on 2015/06/23 10:37:00 UTC

[jira] [Closed] (WICKET-5931) Improve generics for ListView: don't use wildcard for T

     [ https://issues.apache.org/jira/browse/WICKET-5931?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martijn Dashorst closed WICKET-5931.
------------------------------------

> Improve generics for ListView: don't use wildcard for T
> -------------------------------------------------------
>
>                 Key: WICKET-5931
>                 URL: https://issues.apache.org/jira/browse/WICKET-5931
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 7.0.0-M5, 7.0.0-M6
>            Reporter: Martijn Dashorst
>            Assignee: Martijn Dashorst
>             Fix For: 7.0.0
>
>
> The generics for ListView<T> are that the model of each list item is not typed as T but rather ? extends T. This makes the model for the ListView read only, and you can't do anything with the list you get from the ListView.
> For a ListView you care about the T so this should be pure, but you only care about that the model for the ListView is some sort of List, so ? extends List<T> is OK to use.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)