On Tue, 12 May 2026 13:00:07 GMT, Per Minborg <[email protected]> wrote:
> 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). Note that `contains(null)` will cause NPE on `Set.of` but `unmodifiableSet()` result always return `false` (if you could migrate it to `Set.of`, which filters null inputs) ------------- PR Comment: https://git.openjdk.org/jdk/pull/31135#issuecomment-4432035877
