8191429: List.sort should specify the sort is stable
authorpsandoz
Fri, 17 Nov 2017 09:29:47 -0800
changeset 47858 0545aafc7136
parent 47857 13415772f06a
child 47859 065700a01c96
8191429: List.sort should specify the sort is stable Reviewed-by: smarks
src/java.base/share/classes/java/util/List.java
--- 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