You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Carsten Hammer (JIRA)" <ji...@apache.org> on 2019/08/13 09:18:00 UTC

[jira] [Updated] (NETBEANS-2972) inspect and transform contains wrong refactoring "passing zero element array.."

     [ https://issues.apache.org/jira/browse/NETBEANS-2972?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Hammer updated NETBEANS-2972:
-------------------------------------
    Component/s: editor - Refactoring

> 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
>          Components: editor - Refactoring
>    Affects Versions: 11.1
>            Reporter: Carsten Hammer
>            Priority: Major
>
> "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: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists