RFR: 8301220: Return value of toArray() of Сollection types from java.base should be trusted
Sergey Tsypanov
stsypanov at openjdk.org
Fri Jan 27 09:45:07 UTC 2023
On Thu, 26 Jan 2023 10:01:21 GMT, Glavo <duke at openjdk.org> wrote:
> it is necessary to copy the elements to a larger new array
Right, I missed this is addAll() method. Btw, in this class you could do similar optimization in constructor as well.
-------------
PR: https://git.openjdk.org/jdk/pull/12212
More information about the core-libs-dev
mailing list