opensearch-project / OpenSearch

🔎 Open source distributed and RESTful search engine.
https://opensearch.org/docs/latest/opensearch/index/
Apache License 2.0
9.84k stars 1.83k forks source link

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

Closed andrross closed 2 weeks ago

andrross commented 2 weeks ago

Backports 9fc3f4096958159ec9b53012fc7ced19fd793e1b from #5277 to 2.x

Check List

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.

github-actions[bot] commented 2 weeks ago

:x: Gradle check result for d79340f2d1ae7381800244578ecc4d2d58cf5412: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

github-actions[bot] commented 2 weeks ago

:grey_exclamation: Gradle check result for d79340f2d1ae7381800244578ecc4d2d58cf5412: UNSTABLE

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 82.75862% with 20 lines in your changes missing coverage. Please review.

Project coverage is 71.77%. Comparing base (2fa8370) to head (d79340f). Report is 1 commits behind head on 2.x.

Files with missing lines Patch % Lines
...ava/org/opensearch/action/get/MultiGetRequest.java 33.33% 0 Missing and 2 partials :warning:
...search/client/indices/PutIndexTemplateRequest.java 0.00% 1 Missing :warning:
...search/index/rankeval/TransportRankEvalAction.java 50.00% 1 Missing :warning:
...n/indices/alias/TransportIndicesAliasesAction.java 50.00% 1 Missing :warning:
...ion/admin/indices/segments/PitSegmentsRequest.java 0.00% 1 Missing :warning:
...nsearch/action/admin/indices/stats/IndexStats.java 50.00% 1 Missing :warning:
.../indices/template/put/PutIndexTemplateRequest.java 0.00% 1 Missing :warning:
.../admin/indices/upgrade/get/IndexUpgradeStatus.java 0.00% 1 Missing :warning:
...ices/upgrade/get/TransportUpgradeStatusAction.java 0.00% 1 Missing :warning:
...min/indices/upgrade/get/UpgradeStatusResponse.java 0.00% 1 Missing :warning:
... and 9 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## 2.x #16563 +/- ## ============================================ - Coverage 71.95% 71.77% -0.18% + Complexity 65440 65385 -55 ============================================ Files 5312 5312 Lines 305033 305024 -9 Branches 44443 44443 ============================================ - Hits 219475 218931 -544 - Misses 67269 67881 +612 + Partials 18289 18212 -77 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.