8193031: Collections.addAll is likely to perform worse than Collection.addAll

Reviewed-by: plevart
This commit is contained in:
Sergey Tsypanov 2021-01-15 17:38:08 +00:00 committed by Peter Levart
parent 5855d52a2a
commit 27a39c8d3f

View File

@ -5562,9 +5562,8 @@ public class Collections {
/**
* Adds all of the specified elements to the specified collection.
* Elements to be added may be specified individually or as an array.
* The behavior of this convenience method is identical to that of
* {@code c.addAll(Arrays.asList(elements))}, but this method is likely
* to run significantly faster under most implementations.
* The behaviour of this convenience method is similar to that of
* {@code cc.addAll(Collections.unmodifiableList(Arrays.asList(elements)))}.
*
* <p>When elements are specified individually, this method provides a
* convenient way to add a few elements to an existing collection: