[PATCH] Inefficient ArrayList.subList().toArray()

John Rose john.r.rose at oracle.com
Fri Jan 26 00:41:04 UTC 2018


On Jan 25, 2018, at 2:02 PM, Сергей Цыпанов <sergei.tsypanov at yandex.ru> wrote:
> 
> +                return (T[]) Arrays.copyOfRange(root.elementData, offset, size, a.getClass());


Giving this a quick glance:
I think you may want s/size/offset+size/.
There should be calls to checkForComodification.



More information about the core-libs-dev mailing list