Skip to content

Commit

Permalink
Use ConcurrentHashMap.newKeySet where feasible
Browse files Browse the repository at this point in the history
  • Loading branch information
izeye authored and scottfrederick committed Apr 29, 2024
1 parent 1591344 commit e2973a9
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -18,7 +18,6 @@

import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.Collections;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
Expand All @@ -43,7 +42,7 @@
*/
class ScheduledBeanLazyInitializationExcludeFilter implements LazyInitializationExcludeFilter {

private final Set<Class<?>> nonAnnotatedClasses = Collections.newSetFromMap(new ConcurrentHashMap<>(64));
private final Set<Class<?>> nonAnnotatedClasses = ConcurrentHashMap.newKeySet(64);

ScheduledBeanLazyInitializationExcludeFilter() {
// Ignore AOP infrastructure such as scoped proxies.
Expand Down

0 comments on commit e2973a9

Please sign in to comment.