JDK 9 RFR of 8059175: Zero BigDecimal with negative scale prints leading zeroes in String.format
paul.sandoz at oracle.com
Wed Jan 7 09:23:10 UTC 2015
On Dec 24, 2014, at 12:27 AM, Brian Burkhalter <brian.burkhalter at oracle.com> wrote:
> Please review at your convenience.
> Issue: https://bugs.openjdk.java.net/browse/JDK-8059175
> Patch: http://cr.openjdk.java.net/~bpb/8059175/webrev.00/
> In java.util.Formatter.BigDecimalLayout.layout() trailing zeroes are erroneously appended when the unscaled value of the BigDecimal is zero and the scale is negative. Some other minor changes are included to make the logic in the method clearer.
I minor comment, ignore if you wish. If you wanna clean it up further you can merge into one if/else if/else sequence.
More information about the core-libs-dev