My integer overfloweth
By Darcy-Oracle on Jun 15, 2012
While certain classes like
java.lang.Math have been in the platform since the beginning, that doesn't mean there aren't more enhancements to be made in such places!
For example, earlier in JDK 8, library support was added for unsigned integer arithmetic.
More recently, my colleague Roger Riggs pushed a changeset to support integer overflow, that is, to provide methods which throw an
ArithmeticException on overflow instead of returning a wrapped result.
Besides being helpful for various programming tasks in Java, methods like the those for integer overflow can be used to implement runtimes supporting other languages, as has been requested at a past JVM language summit.
This year's language summit is coming up in July and I hope to get some additional suggestions there for helpful library additions as part of the general discussions of the JVM and Java libraries as a platform.