From 08216fc1980fb5e5893339c14481f3d10b35059c Mon Sep 17 00:00:00 2001 From: Ivan Gerasimov Date: Thu, 15 Oct 2015 13:56:39 +0300 Subject: [PATCH] 8138938: Clarify javadoc for java.util.Collections.copy() Reviewed-by: smarks --- jdk/src/java.base/share/classes/java/util/Collections.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jdk/src/java.base/share/classes/java/util/Collections.java b/jdk/src/java.base/share/classes/java/util/Collections.java index 7f9cb7c83f7..fec21c29079 100644 --- a/jdk/src/java.base/share/classes/java/util/Collections.java +++ b/jdk/src/java.base/share/classes/java/util/Collections.java @@ -537,8 +537,9 @@ public class Collections { * Copies all of the elements from one list into another. After the * operation, the index of each copied element in the destination list * will be identical to its index in the source list. The destination - * list must be at least as long as the source list. If it is longer, the - * remaining elements in the destination list are unaffected.

+ * list's size must be greater than or equal to the source list's size. + * If it is greater, the remaining elements in the destination list are + * unaffected.

* * This method runs in linear time. *