Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
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.