Carsten Hammer created NETBEANS-2972:
----------------------------------------
Summary: inspect and transform contains wrong refactoring "passing
zero element array.."
Key: NETBEANS-2972
URL: https://issues.apache.org/jira/browse/NETBEANS-2972
Project: NetBeans
Issue Type: Bug
Reporter: Carsten Hammer
"Passing zero element array to Collection.toArray may affect performance"
This refactoring decreases performance according to
[https://shipilev.net/blog/2016/arrays-wisdom-ancients/]
On recent VMs, collection.toArray(new T[0]) is faster than
collection.toArray(new T[collection.size()]). Since it is also more readable,
it should now be the preferred way of collection to array conversion.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists