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