BigInteger.bitLength() can return negative result
Joseph D. Darcy
Joe.Darcy at Sun.COM
Thu Oct 15 18:27:16 UTC 2009
Dmitry Nadezhin wrote:
>
>>> d) All BigInteger constructors ensure that the bit length is no
>>> larger than 2^31 - 1;
>>
>> d) is arguably the most correct approach to address the problem.
>> However, I think the practical consequences of this flaw are low.
> Nevertheless, may I use this unimportant flaw as a lesson of Java bug
> fixing ?
>
No fix for the bug has yet been offered.
You're independently rediscovered a bug that has been in the platform
for about 12 years.
-Joe
More information about the core-libs-dev
mailing list