JDK-8037106 : Optimize Arrays.asList(...).forEach
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.util:collections
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2014-03-11
  • Updated: 2015-01-06
  • Resolved: 2014-03-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u20Fixed 9 b06Fixed
Description
Currently Arrays.asList(...).forEach defers to the default implementation on Iterable.

An optimized implementation can be provided directly iterating over the array. Same can apply for other default methods, replaceAll and sort.