Bug in Long.parseUnsignedLong

Brian Burkhalter brian.burkhalter at oracle.com
Thu Dec 19 17:42:10 UTC 2013


On Dec 19, 2013, at 9:36 AM, Paul Sandoz wrote:

> I think the logic for overflow when using the compareUnsigned is incorrect in Long:
> 
> […]
>                long result = first * radix + second;
>                if (compareUnsigned(result, first) < 0) {

I concur and verified that yesterday by replacing the above logic with BigInteger equivalents which passed the test.

> My brain is too clogged up with cold at the moment to propose a fix :-(

Hope you recover soon!

Thanks,

Brian


More information about the core-libs-dev mailing list