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

Jeanne Waldman updated TRINIDAD-1539:
-------------------------------------

       Resolution: Fixed
    Fix Version/s:  1.2.12-core
           Status: Resolved  (was: Patch Available)

This will be in the next release, which will be 1.2.12-core

> grouping and parsing regressions in convertNumber
> -------------------------------------------------
>
>                 Key: TRINIDAD-1539
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1539
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>            Reporter: Cale Scholl
>             Fix For:  1.2.12-core
>
>         Attachments: 1.2.11.4-branch_groupingParsing.patch, 
> trunk_groupingParsing.patch
>
>
> Grouping regression caused by:
> https://issues.apache.org/jira/browse/TRINIDAD-1534
> The fix is to replace this:
>   balance = ints.substring(0, toMuch) + groupingSeparator;
> with this:
>   balance = (counter < 4) ? ints.substring(0, toMuch) : ints.substring(0, 
> toMuch) + groupingSeparator;
> The reason I didn't notice this mistake is that I was only testing with 
> integers containing 4 or more digits.
> ---
> Parsing regression caused by:
> https://issues.apache.org/jira/browse/TRINIDAD-1537
> The fix is that instead of calling a function like this:
>   stringToNumber(numberString); 
> you need to call it like this:
>   this.stringToNumber(numberString); 
> This was a stupid js mistake; I didn't catch it because I was testing by 
> typing just a number into the percent field, in which case the percent symbol 
> is automatically appended,  and only the 
> TrNumberFormat.prototype.stringToNumber code path is hit. If you type in the 
> percent symbol, then the TrNumberFormat.prototype.stringToPercentage code 
> path is hit.

-- 
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