This PR proposes to replace older `Collection.unmodifiable` wrappers with `Set.of()` instead. This can improve performance, reduce footprint, and reduce maintenance. There is also occasional use of `Map.of()` in nearby places where `Set.of()` was introduced.
The PR also contains two optimizations in `PlatformMBeanProviderImpl` that remove `synchronized` from two methods. --------- - [X] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). ------------- Commit messages: - Update copyright year - Use List.of - Optimize ArrayList usage - Merge branch 'master' into rfe-use-set-factories - Add additional Set/Map of() - Update copyright year - Use Set.of Changes: https://git.openjdk.org/jdk/pull/31135/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=31135&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8384430 Stats: 153 lines in 16 files changed: 4 ins; 27 del; 122 mod Patch: https://git.openjdk.org/jdk/pull/31135.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/31135/head:pull/31135 PR: https://git.openjdk.org/jdk/pull/31135
