[richfaces-issues] [JBoss JIRA] Created: (RF-6865) ClassCastException in UIPickList.noOpConverter method getAsString()

Anton Lisovenko (JIRA) jira-events at lists.jboss.org
Sun Apr 19 16:12:22 EDT 2009


ClassCastException in UIPickList.noOpConverter method getAsString()
-------------------------------------------------------------------

                 Key: RF-6865
                 URL: https://jira.jboss.org/jira/browse/RF-6865
             Project: RichFaces
          Issue Type: Bug
          Components: component
    Affects Versions: 3.3.1
         Environment: Windows XP, Apache Tomcat 6.0
            Reporter: Anton Lisovenko
            Priority: Critical


There were no such exceptions in all versions before 3.3.1.Beta. Everything worked. But in 3.3.1.Beta3 and Beta5 (other Beta were not tested), the following exception is raised when rendering rich:pickList compnent:

Here is stacktrace:

java.lang.ClassCastException: java.lang.Long
	at org.richfaces.component.UIPickList$1.getAsString(UIPickList.java:98)
	at org.richfaces.renderkit.PickListRenderer.encodeItem(PickListRenderer.java:343)
	at org.richfaces.renderkit.PickListRenderer.encodeRows(PickListRenderer.java:282)
	at org.richfaces.renderkit.PickListRenderer.encodeSourceRows(PickListRenderer.java:361)
	at org.richfaces.renderkit.html.PickListRendererGen.doEncodeChildren(PickListRendererGen.java:371)
	at org.richfaces.renderkit.html.PickListRendererGen.doEncodeChildren(PickListRendererGen.java:279)
	at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:120)
	at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
	at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChild(RendererUtils.java:415)
	at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChildren(RendererUtils.java:401)
	at org.apache.myfaces.renderkit.html.ext.HtmlGroupRenderer.encodeEnd(HtmlGroupRenderer.java:71)
	at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:861)
...

The input value for the method is Long: 10. Initially the SelectItem with value 10 is passed to the method 'PickListRendererGen.encodeItem', this seems correct, and it is not clean, why the 'noOpConverter' in UIPickList calls

return (String) value;


instead of 

return value.toString();

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the richfaces-issues mailing list