On Fri, 15 May 2026 03:28:05 GMT, Stuart Marks <[email protected]> wrote:
>> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Revert change > > src/java.management/share/classes/java/lang/management/DefaultPlatformMBeanProvider.java > line 81: > >> 79: return Map.of( >> 80: ManagementFactory.CLASS_LOADING_MXBEAN_NAME, >> 81: ManagementFactoryHelper.getClassLoadingMXBean()); > > In this case and in the two singleton (set) cases above, there's really no > advantage of Set.of() over singleton/singletonMap. > > Oh... there are additional occurrences of singleton/singletonMap below to > which this comment also applies. The unmodifiables are trusted, whereas the singleton*s are not. But maybe that is not super relevant here? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/31135#discussion_r3259370136
