TabbedPanel uses too much generics (revert Wicket-2135)
-------------------------------------------------------
Key: WICKET-2292
URL: https://issues.apache.org/jira/browse/WICKET-2292
Project: Wicket
Issue Type: Bug
Components: wicket
Affects Versions: 1.4-RC3
Reporter: Erik van Oosten
Fix For: 1.4-RC5
Please revert Wicket-2135.
By declaring the list of tabs as List<? extends ITab> you are saying that the
list contains elements with some super type that is a subtype of ITab. Having
this type there is no way of knowing which exact supertype that is, just that
it is a subclass of ITab. The result is that you can only add null to the list.
Of course this is non-sense; TabbedPanel uses ITab and not some unknown
subclass thereof.
To demonstrate: right now you can not do:
ITab tab = ...;
tabbedPanel.getTabs().add(tab);
To properly solve Wicket-2135, the user should cast his/her list to List<ITab>
or just create a list of that type in the first place.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.