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

Leonardo Uribe resolved MYFACES-1890.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.3-SNAPSHOT
                   1.2.10-SNAPSHOT

Checking myfaces-commons-converters TypedNumberConverter and reading again this 
issue and TRINIDAD-1124, the conclusion is the only thing we can do is check if 
the ValueExpression return BigDecimal and if that so, call 
setParseBigDecimal(true). It could be a little bit expensive compared with the 
time required to do the operation, but it is better fix it and pass TCK tests. 
Instead, on TypedNumberConverter we can take advantage of destType property so 
the EL call to getType() will not be required in that case.

> Numberconverter has issue with bigdecimal
> -----------------------------------------
>
>                 Key: MYFACES-1890
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1890
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions:  1.2.0, 1.2.2, 1.2.3
>            Reporter: Matthias Weßendorf
>            Assignee: Matthias Weßendorf
>             Fix For: 1.2.10-SNAPSHOT, 2.0.3-SNAPSHOT
>
>
> Due to a potential bug in BigDecimal there is a bug, when you use BigDecimal
> with a NumberConverter.
> Like
> <tr:inputText value="#{bean.number}" ...>
>   <tr:convertNumber />
> </tr:inputText>
> For instance, when the entered value is "333.111" the actual stored value is 
> 333.1109999999999899955582804977893829345703125
> There is a mathematic explanation for that in here:
> http://en.wikipedia.org/wiki/Floating_point#Accuracy_problems

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to