Re: Doc updates was Re: RFR 8030848: Collections.sort(List l, Comparator) should defer to List.sort(Comparator )

2014-01-14 Thread Mike Duigou
The docs changes look good to me. Mike On Jan 13 2014, at 05:39 , Paul Sandoz paul.san...@oracle.com wrote: On Jan 10, 2014, at 3:01 PM, Alan Bateman alan.bate...@oracle.com wrote: The implementation changes look good. I agree that the javadoc needs changing as it's otherwise misleading as

Re: RFR 8030848: Collections.sort(List l, Comparator) should defer to List.sort(Comparator )

2014-01-13 Thread Paul Sandoz
On Jan 10, 2014, at 6:56 PM, Mike Duigou mike.dui...@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

Doc updates was Re: RFR 8030848: Collections.sort(List l, Comparator) should defer to List.sort(Comparator )

2014-01-13 Thread Paul Sandoz
On Jan 10, 2014, at 3:01 PM, Alan Bateman alan.bate...@oracle.com wrote: The implementation changes look good. I agree that the javadoc needs changing as it's otherwise misleading as to what the implementation actually does. I would think that this should go with the implementation change

RFR 8030848: Collections.sort(List l, Comparator) should defer to List.sort(Comparator )

2014-01-10 Thread Paul Sandoz
Hi, When we added the List.sort method the default implementation deferred to Collections.sort. This is the wrong way around, since any existing use of Collections.sort say with ArrayList will not avail of the optimal implementation provided by ArrayList.sort. To resolve this the

Re: RFR 8030848: Collections.sort(List l, Comparator) should defer to List.sort(Comparator )

2014-01-10 Thread Alan Bateman
On 10/01/2014 11:21, Paul Sandoz wrote: Hi, When we added the List.sort method the default implementation deferred to Collections.sort. This is the wrong way around, since any existing use of Collections.sort say with ArrayList will not avail of the optimal implementation provided by

Re: RFR 8030848: Collections.sort(List l, Comparator) should defer to List.sort(Comparator )

2014-01-10 Thread Mike Duigou
The implementation looks good. I would move construction of the listIterator to before the toArray() for detection of concurrent modification (growing of the list). I believe we should fix this for 8 if possible. Mike On Jan 10 2014, at 03:21 , Paul Sandoz paul.san...@oracle.com wrote: Hi,