Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 2.x] Call 'toArray()' with an empty array instead of a pre-sized array #16563

Merged

Commits on Nov 5, 2024

  1. Call 'toArray()' with an empty array instead of a pre-sized array (op…

    …ensearch-project#5277)
    
    Calls to `Collection.toArray()` is not consistent and in many places and use a
    pre-sized array parameter. This change makes a consistent use of the
    `toArray(new T[0])`. The empty array usage is considered faster, safer and
    cleaner than the sized based array approach.
    
    Signed-off-by: Rabi Panda <[email protected]>
    adnapibar authored and andrross committed Nov 5, 2024
    Configuration menu
    Copy the full SHA
    d79340f View commit details
    Browse the repository at this point in the history