Skip to content

Commit 50cab2d

Browse files
Merge pull request #40567 from izeye
* pr/40567: Use ConcurrentHashMap.newKeySet where feasible Closes gh-40567
2 parents 1591344 + e2973a9 commit 50cab2d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/task/ScheduledBeanLazyInitializationExcludeFilter.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2023 the original author or authors.
2+
* Copyright 2012-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -18,7 +18,6 @@
1818

1919
import java.lang.reflect.Method;
2020
import java.util.Arrays;
21-
import java.util.Collections;
2221
import java.util.Map;
2322
import java.util.Set;
2423
import java.util.concurrent.ConcurrentHashMap;
@@ -43,7 +42,7 @@
4342
*/
4443
class ScheduledBeanLazyInitializationExcludeFilter implements LazyInitializationExcludeFilter {
4544

46-
private final Set<Class<?>> nonAnnotatedClasses = Collections.newSetFromMap(new ConcurrentHashMap<>(64));
45+
private final Set<Class<?>> nonAnnotatedClasses = ConcurrentHashMap.newKeySet(64);
4746

4847
ScheduledBeanLazyInitializationExcludeFilter() {
4948
// Ignore AOP infrastructure such as scoped proxies.

0 commit comments

Comments
 (0)