changeset 47931:0545aafc7136

8191429: List.sort should specify the sort is stable Reviewed-by: smarks
author psandoz
date Fri, 17 Nov 2017 09:29:47 -0800
parents 13415772f06a
children 065700a01c96
files src/java.base/share/classes/java/util/List.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/util/List.java	Fri Nov 17 15:43:12 2017 +0100
+++ b/src/java.base/share/classes/java/util/List.java	Fri Nov 17 09:29:47 2017 -0800
@@ -442,7 +442,8 @@
 
     /**
      * Sorts this list according to the order induced by the specified
-     * {@link Comparator}.
+     * {@link Comparator}.  The sort is <i>stable</i>: this method must not
+     * reorder equal elements.
      *
      * <p>All elements in this list must be <i>mutually comparable</i> using the
      * specified comparator (that is, {@code c.compare(e1, e2)} must not throw