[richfaces-issues] [JBoss JIRA] Closed: (RF-5004) toScript method in ScriptUtils.java doesn't handle type enum
Alexander Dubovsky (JIRA)
jira-events at lists.jboss.org
Tue Jan 20 07:58:08 EST 2009
[ https://jira.jboss.org/jira/browse/RF-5004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexander Dubovsky closed RF-5004.
----------------------------------
Assignee: Alexander Dubovsky
> toScript method in ScriptUtils.java doesn't handle type enum
> ------------------------------------------------------------
>
> Key: RF-5004
> URL: https://jira.jboss.org/jira/browse/RF-5004
> Project: RichFaces
> Issue Type: Bug
> Affects Versions: 3.2.2
> Environment: RichFaces 3.2.2, Mojarra 1.2_09
> Reporter: Nathan Collette
> Assignee: Alexander Dubovsky
> Fix For: 3.3.0
>
>
> I'm using the rich:suggestionbox component, and for the suggestionAction, it is fetching some organization objects. These objects happen to have a property that is an enum.
> The error that is thrown is a java.lang.StackOverflowError at org.ajax4jsf.javascript.ScriptUtils.toScript(ScriptUtils.java:135)
> When I remove the enum, the suggestions are displayed accurately.
> I reviewed that code, and it seems that it was not designed with enums in mind. The latest repository code in the trunk shows no change in the specified area.
> I thought about what I'd change, if I was trying to fix this myself, and at best guess, I would either change line 127 to:
> if ("class".equals(key) || "declaringClass".equals(key)) {
> or I would change line 112 to:
> } else if (obj instanceof String || obj instanceof Enum ) {
> at a minimum, the error could be avoided, by skipping enums, and not trying to toScript() them. ie: if instanceof Enum return ""
--
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