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

Joseph D. Darcy Joe.Darcy at Sun.COM
Tue Oct 20 16:52:22 UTC 2009


Alan Bateman wrote:

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.MINVALUE) 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.

Import removed; thanks,

-Joe



More information about the core-libs-dev mailing list