Java 8 RFR 6480539: BigDecimal.stripTrailingZeros() has no effect on zero itself ("0.0")
joe.darcy at oracle.com
Wed Jul 3 17:35:47 UTC 2013
I have some concerns with this patch.
First, I think the stripTrailingZeros specification should explicitly
call out what happens with a numerically zero value.
Second, I would have expected the code change to be limited to the
stripTrailingZeros method. The private createAndStripZerosToMatchScale
methods are used during rounding operations and unconditionally set the
scale of a zero value to zero, which is incorrect according to the
I believe sufficiently thorough tests of divide should fail with the
current changes to createAndStripZerosToMatchScale.
On 07/03/2013 08:46 AM, Brian Burkhalter wrote:
> The patch here
> is proposed to resolve this issue
> which was most recently discussed in this thread
> The proposed fix in this prior thread is withdrawn.
More information about the core-libs-dev