No need to call `List.indexOf(Object)` before `List.remove(int)`. Instead we can call `List.remove(Object)` directly. It's faster and cleaner. `eventsList` is an ArrayList.
------------- Commit messages: - [PATCH] Remove unnecessary List.indexOf key from Track.remove Changes: https://git.openjdk.org/jdk/pull/24818/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24818&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8359996 Stats: 4 lines in 1 file changed: 0 ins; 2 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/24818.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24818/head:pull/24818 PR: https://git.openjdk.org/jdk/pull/24818