You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MetricsSystem.java:38: warning: [JdkObsolete] It is very rare for LinkedList to out-perform ArrayList or ArrayDeque. Avoid it unless you're willing to invest a lot of time into benchmarking. Caveat: LinkedList supports null elements, but ArrayDeque does not.
private List metricsReporters = new LinkedList<>();
<!--
1. Title: [#<issue>] <type>(<scope>): <subject>
Examples:
- "[#123] feat(operator): support xxx"
- "[#233] fix: check null before access result in xxx"
- "[MINOR] refactor: fix typo in variable name"
- "[MINOR] docs: fix typo in README"
- "[#255] test: fix flaky test NameOfTheTest"
Reference: https://www.conventionalcommits.org/en/v1.0.0/
2. If the PR is unfinished, please mark this PR as draft.
-->
### What changes were proposed in this pull request?
Replace LinkedList with ArrayList.
### Why are the changes needed?
Address linter issues mentioned in #2163.
Fix#2163
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Covered by existing tests.
What would you like to be improved?
MetricsSystem.java:38: warning: [JdkObsolete] It is very rare for LinkedList to out-perform ArrayList or ArrayDeque. Avoid it unless you're willing to invest a lot of time into benchmarking. Caveat: LinkedList supports null elements, but ArrayDeque does not.
private List metricsReporters = new LinkedList<>();
See https://errorprone.info/bugpattern/JdkObsolete)
How should we improve?
No response
The text was updated successfully, but these errors were encountered: