ClassCastException when binding number-grouping-separator
---------------------------------------------------------
Key: TRINIDAD-145
URL: https://issues.apache.org/jira/browse/TRINIDAD-145
Project: MyFaces Trinidad
Issue Type: Bug
Affects Versions: 1.2.1-core
Reporter: Jeanne Waldman
Assignee: Jeanne Waldman
In trinidad-config.xml, set this:
<number-grouping-separator>#{view.locale.language=='de' ? 'o' :
'x'}</number-grouping-separator>
Run a page.
You'll get a ClassCastException trying to cast a String to a Character in
RequestContextImpl in this code:
@Override
public char getNumberGroupingSeparator()
{
Character c = (Character) _bean.getProperty(
RequestContextBean.NUMBER_GROUPING_SEPARATOR_KEY);
if (c != null)
return c.charValue();
return (char) 0;
}
This is a problem in both the 1.2.1 branch and the Trunk.
Adam suggested as a fix:
@ In 1.1, we should be unwrapping the String into a Character.
@ In 1.2, we should change LazyValueBinding to LazyValueExpression and take
@ advantage of the automatic coercion in ValueExpressions.
I have a patch for the 1.2 version that I will upload soon for review.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.