Code review request for 6371401: java.math.BigInteger.shift(Integer.MIN_VALUE) throws StackOverflowError

Alan Bateman Alan.Bateman at Sun.COM
Tue Oct 20 09:00:33 UTC 2009


Joseph D. Darcy wrote:
> Hello.
>
> Please review this simple improvement in handling an exceptional 
> condition in BigInteger.  A stack overflow on an argument of 
> BigInteger.shitf{Left, Right}(Integer.MIN_VALUE) is handled as an 
> explicit ArithmeticException, the same exception used throughout 
> BigInteger for other invalid inputs.
>
> Patch below; webrev at
> http://cr.openjdk.java.net/~darcy/6371401.0/
>
> Thanks,
>
> -Joe
This looks okay to me. Minor comment is that ExtremeShiftingTests 
probably doesn't need to import java.math.

-Alan.



More information about the core-libs-dev mailing list