[ https://issues.apache.org/jira/browse/WICKET-3439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12992630#comment-12992630 ]
Richard Emberson commented on WICKET-3439: ------------------------------------------ Also, in CheckBoxMultipleChoice appendOptionHtml method there is: Object displayValue = getChoiceRenderer().getDisplayValue(choice); Should this also be: T displayValue = (T)getChoiceRenderer().getDisplayValue(choice); > org.apache.wicket.markup.html.form.AbstractChoice renderer cast in method > appendOptionHtml > ------------------------------------------------------------------------------------------ > > Key: WICKET-3439 > URL: https://issues.apache.org/jira/browse/WICKET-3439 > Project: Wicket > Issue Type: Bug > Components: wicket > Affects Versions: 1.5-RC1 > Environment: all > Reporter: Richard Emberson > Priority: Minor > > In class org.apache.wicket.markup.html.form.AbstractChoice<T, E> the renderer > instance > variable has signature: > private IChoiceRenderer<? super E> renderer; > In the method appendOptionHtml the renderer's getDisplayValue method is > called as follows: > T objectValue = (T)renderer.getDisplayValue(choice); > where the signature for the IChoiceRenderer<E> getDisplayValue method is: > Object getDisplayValue(E object); > So, is it a fact that for all usages of AbstractChoice that the display value > returned by a > renderer of type E will always be of type T (not Object)??? If not, then one > should expect cast > exceptions. -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira