United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-8032636 : Collections.sort(List l, Comparator) should defer to List.sort(Comparator )

Details
Type:
Backport
Submit Date:
2014-01-24
Status:
Closed
Updated Date:
2014-10-02
Project Name:
JDK
Resolved Date:
2014-01-24
Component:
core-libs
OS:
Sub-Component:
java.util:collections
CPU:
Priority:
P1
Resolution:
Fixed
Affected Versions:
8u20
Fixed Versions:
8u20 (b01)

Related Reports
Backport:

Sub Tasks

Description
                                    

Comments
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. 
                                     
2014-07-23
Closed/verified (executed lang tests)
                                     
2014-03-24



Hardware and Software, Engineered to Work Together