Tuesday, January 31, 2017

Minor API fixes for JDK 7

Minor API fixes for JDK 7


Josh, Doug and I are proposing a handful of minor API additions to the Java Class Libraries (lang, util, math and reflect) for JDK 7.

The very quick overview of our recommendations:
  1. Static compare() methods for all non-void wrapper classes, not just Double and Float.
  2. Static hashCode() methods on all non-void wrapper classes.
  3. Integer.mod() and Long.mod()
  4. RoundingMode.round(double)
  5. Arrays.concat()
  6. EnumSet.complementOf(Collection)
  7. All JDK maps should implement putIfAbsent(), etc.
  8. Proxy.newProxyInstance(type, handler)
Were pretty confident that these changes will make it into JDK 7, barring any particular controversy that could develop.

Please have a read over the document. What do you think about our proposals? What do you think weve missed?

Available link for download