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

Peter Levart plevart at openjdk.java.net
Fri Jan 8 11:30:55 UTC 2021


On Fri, 8 Jan 2021 09:37:23 GMT, Сергей Цыпанов <github.com+10835776+stsypanov at openjdk.org> wrote:

>> Apart from the @SuppressWarnings, this looks good to me.
>> And i like the irony of this.
>
> @forax, @plevart could I ask for review once again?

Hi @stsypanov, 

> The **behavior** of this convenience method is **identical** to that of c.addAll(Arrays.asList(elements))

What about:

> The **behaviour** of this convenience method is **similar** to that of c.addAll(Arrays.asList(elements))

...since it is not entirely identical. The outcome is usually identical because collections usually adhere to the specification, but we can not claim the behaviour is identical if the target collection does not adhere.

-------------

PR: https://git.openjdk.java.net/jdk/pull/1764


More information about the core-libs-dev mailing list