Matthew Dempsky has posted comments on this change.

Change subject: Issue 7834 - fix BigDecimal compareTo
......................................................................


Patch Set 5:

So for the record here, this bug ended up being a number of issues that hilariously interacted:

1. There were two loops that tried to account for leading zeros not counting towards the precision, so leading zeros were actually getting double counted.

2. Actually, only one of the loops correctly counted leading minus signs too, so only positive numbers could get double counted.

3. Our only unit test for checking precision tested with a negative value.

4. Even if we had double counting and messed up the precision value, the precision() getter method treats zero and negative values as "not computed yet", so it would recalculate them.

The double counting bug only affects numbers like "001234" where the number of significant digits exceeds the number of leading zeros by at least one.

--
To view, visit https://gwt-review.googlesource.com/1660
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9874897f54a9eb6ce15f5b7b6295613800a25b72
Gerrit-PatchSet: 5
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: John A. Tamplin <[email protected]>
Gerrit-Reviewer: Brian Slesinsky <[email protected]>
Gerrit-Reviewer: John A. Tamplin <[email protected]>
Gerrit-Reviewer: Matthew Dempsky <[email protected]>
Gerrit-Reviewer: Thomas Broyer <[email protected]>
Gerrit-HasComments: No

--
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- You received this message because you are subscribed to the Google Groups "Google Web Toolkit Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to