A DESCRIPTION OF THE REQUEST :
Collections.sort() copies the passed in Collection in an array and sorts this array via Arrays.sort().
If an ArrayList is passed in it should sort on the backing array of that ArrayList directly to avoid an additional memory copy.
JUSTIFICATION :
For larger lists this additional memory copy costs time. Esp with the new improved Arrays.sort() for nearly sorted lists.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Collections.sort() for an ArrayList should have the same runtime and memory requirements as sorting the equivalent array directly.
ACTUAL -
Additional memory is required, and data is copied twice even when the passed in collection is already sorted.
CUSTOMER SUBMITTED WORKAROUND :
No direct work around possible because access to the backing array of ArrayList is private, but reflection could be used to access that array directly.
ArrayList could be reimplemented in user code to allow accessing the array.