jjb at google.com
Tue Jul 7 09:59:16 PDT 2009
On Tue, Jul 7, 2009 at 2:51 AM, Christopher Hegarty -Sun Microsystems
Ireland <Christopher.Hegarty at sun.com> wrote:
> Hi Martin,
> Sorry for joining the party late...
> I think adding the system property should take care of the compatibility
> issues, at least giving the user the ability to revert to the old behavior
> if they so choose.
> I have a few minor comments ( if these issue have been discussed already I
> apologize ):
> 1) Should we update the Arrays class description and appropriate sort
> methods to now refer to timsort instead of saying: "The sorting
> algorithm is a modified mergesort...". I know this is not strictly
> necessary, but you must have considered it already, right?
No. I totally missed it. Good catch!
> 2) With the addition of @throws IllegalArgumentException, this
> condition cannot be met with the old merge sort right, i.e. running
> with -Djava.util.Arrays.useLegacyMergeSort=true. So we're saying
> that all bets are off when running with this property set?
Others have already commented on this; this @throws clause makes no
promises, but calls out a (desirable) behavior that the new implementation
might exhibit (and the old one never will) when the user has violated a
fundamental contract (hence all bets are off).
P.S. Thanks all, and especially Martin, for shepherding this work into the
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the core-libs-dev