[
https://issues.apache.org/jira/browse/LUCENE-7691?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15862530#comment-15862530
]
Michael McCandless commented on LUCENE-7691:
--------------------------------------------
See also https://shipilev.net/blog/2016/arrays-wisdom-ancients/
It's about converting a Collection to an array and whether you should pass a
properly sized array or not when you call {{.toArray}}.
> ArrayLists should be created with explicit size if known
> --------------------------------------------------------
>
> Key: LUCENE-7691
> URL: https://issues.apache.org/jira/browse/LUCENE-7691
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Michael Braun
> Priority: Trivial
>
> Many places in Lucene there are ArrayLists being created with no explicit
> size set even when the exact size is known in advance. In these places, the
> size should be passed in so the underlying array is sized correctly the first
> time.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]