RFR 8030848: Collections.sort(List l, Comparator) should defer to List.sort(Comparator )
Paul Sandoz
paul.sandoz at oracle.com
Mon Jan 13 11:19:38 UTC 2014
On Jan 10, 2014, at 6:56 PM, Mike Duigou <mike.duigou at oracle.com> wrote:
> The implementation looks good. I would move construction of the listIterator to before the toArray() for detection of concurrent modification (growing of the list).
>
If there is another thread concurrently operating on a non-current list during invocation of the sort method then it's gonna produce weird results, and any concurrent-like list should be overriding this impl and locking the sort (e.g. COWAL).
For single threaded execution i suppose the Comparator could monkey around with the list, it's a long shot but is that what you are getting at?
Paul.
> I believe we should fix this for 8 if possible.
>
> Mike
More information about the core-libs-dev
mailing list