On Thu, 2 Jun 2022 00:36:28 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:

> BTW I think that the usage of
> `return icons.toArray(EMPTY_TRAY_ARRAY);`
> is slower than any of other cases: presized or zero. So if we would like to 
> use a similar pattern the zero version is better.

Why is it? It's the same as `icons.toArray(new TrayIcon[0])` without creating a 
new zero-sized array.

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

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

Reply via email to