[
https://issues.apache.org/jira/browse/WICKET-1559?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12591267#action_12591267
]
Martin Benda commented on WICKET-1559:
--------------------------------------
Hi,
changing all collection return types to use wildcards is IMHO really bad idea.
Yes, it can be sometimes useful, but mostly it will cause more problems that it
solves... A simple example:
List<? extends Component> getComponents() ...
...
getComponents().add(new Label(...)); // !!! ERROR (it would work without the
wildcard)
And the special example at your blog is certainly not a reason to change all
collection return types in Wicket API...
Regards,
Bendis
P.S.: List<? extends String> or List<? extends Locale> is a real nonsense
because these classes are final :-)
> Widening Generics...
> --------------------
>
> Key: WICKET-1559
> URL: https://issues.apache.org/jira/browse/WICKET-1559
> Project: Wicket
> Issue Type: Improvement
> Affects Versions: 1.4-M1
> Reporter: Johannes Schneider
> Priority: Trivial
> Fix For: 1.4-M2
>
> Attachments: widening1.patch, widening2.patch
>
>
> A patch that widens more generic collections.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.