Collections.emptyList() 或 Collections.singletonList() 调用替换为对 Arrays.asList() 的调用。
当项目或模块使用语言级别 9 时:
Collections.emptyList() 或 Collections.singletonList() 替换为对 java.util.List.of() 的调用。Collections.emptySet() 或 Collections.singleton() 调用替换为 java.util.Set.of()。Collections.emptyMap() 或 Collections.singletonMap() 调用替换为 java.util.Map.of()。当项目或模块使用 Guava 库且语言级别为 9 或更低时,该意图会将 Collections.emptyList() 或 Collections.singletonList() 调用替换为 com.google.common.collect.ImmutableList、com.google.common.collect.ImmutableSet 或
com.google.common.collect.ImmutableMap。