Need reviewer: JDK 8 CR for Support Integer overflow (original) (raw)

Roger Riggs Roger.Riggs at oracle.com
Thu Feb 2 20:15:41 UTC 2012


There is a need for arithmetic operations that throw exceptions when the results overflow the representation of int or long.

The CR is 6708398: Support integer overflow <http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6708398>

Please review this webrev <http://cr.openjdk.java.net/%7Erriggs/CR6708398/webrev/> to add static methods in java.lang.Math to support addExact(), subtractExact(), negateExact(), multiplyExact(), and toIntExact() for int and long primitive types.

Thanks, Roger Riggs



More information about the core-libs-dev mailing list