JDK-8032636 : Collections.sort(List l, Comparator) should defer to List.sort(Comparator )
  • Type: Backport
  • Backport of: JDK-8030848
  • Component: core-libs
  • Sub-Component: java.util:collections
  • Affected Version: 8u20
  • Priority: P1
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2014-01-24
  • Updated: 2014-10-02
  • Resolved: 2014-01-24
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.
8u20 b01Fixed 9Fixed
Text suitable for release notes. Collection.sort defers now defers to List.sort Previously Collection.sort copied the elements of the list to sort into an array, sorted that array, then updated list, in place, with those elements in the array, and the default method List.sort deferred to Collection.sort. This is a non-optimal arrangement. In this release Collection.sort defers to List.sort. This means, for example, existing code that calls Collection.sort with an instance of ArrayList will now use the optimal sort implemented by ArrayList.

Closed/verified (executed lang tests)