Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 10 commits into from
5 changes: 2 additions & 3 deletions src/java.base/share/classes/java/util/Collections.java
Original file line number Diff line number Diff line change
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