Skip to content


Browse files Browse the repository at this point in the history
8193031: Collections.addAll is likely to perform worse than Collectio…

Reviewed-by: plevart
  • Loading branch information
stsypanov authored and Peter Levart committed Jan 15, 2021
1 parent 5855d52 commit 27a39c8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/java.base/share/classes/java/util/
Expand Up @@ -5562,9 +5562,8 @@ public static boolean disjoint(Collection<?> c1, Collection<?> c2) {
* 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:
Expand Down

1 comment on commit 27a39c8

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.