myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeanne Waldman (JIRA)" <...@myfaces.apache.org>
Subject [jira] Updated: (TRINIDAD-145) ClassCastException when binding number-grouping-separator
Date Thu, 09 Aug 2007 16:53:42 GMT

     [ https://issues.apache.org/jira/browse/TRINIDAD-145?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jeanne Waldman updated TRINIDAD-145:
------------------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

New Revision: 564247 on 1.2.2-branch

New Revision: 564025 on Trunk

The two fixes are described above.

> 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
>         Attachments: LazyValueExpressionPatch.patch, LazyValueExpressionPatch2.patch,
UnwrapStringToCharPatch.patch, UnwrapStringToCharPatch2.patch
>
>
> 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.


Mime
View raw message