RFR 8030848: Collections.sort(List l, Comparator) should defer to List.sort(Comparator )
Paul Sandoz
paul.sandoz at oracle.com
Fri Jan 10 14:13:03 UTC 2014
On Jan 10, 2014, at 3:01 PM, Alan Bateman <Alan.Bateman at 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 rather than as a separate change.
>
Yes, i did the easy bit first :-)
> So is the stack overflow concern with List implementations that were originally developed to target JDK 7 or older?
No, i think that case is OK, since those implementations will automatically inherit the correct defaults when run with 8.
I am referring to following situation: a class developed against 8 that extends List and for some reason overrides List.sort with an implementation that defers to Collection.sort.
Such an instance of a class executed in 9 with this fix would barf on sort, hence it is better to close the gap sooner rather than later, even though this is admittedly a rare scenario.
Paul.
> In any case, this is the type of change more suitable to a major release.
>
More information about the core-libs-dev
mailing list