Skip to content

Commit 5d5cd17

Browse files
committed
Polish "Rename earlyProxyReferences in AbstractAutoProxyCreator"
See gh-23914
1 parent 67e3b1b commit 5d5cd17

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/AbstractAutoProxyCreator.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2023 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.
@@ -138,8 +138,7 @@ public abstract class AbstractAutoProxyCreator extends ProxyProcessorSupport
138138

139139
private final Set<String> targetSourcedBeans = Collections.newSetFromMap(new ConcurrentHashMap<>(16));
140140

141-
/** Cache of early target objects: cacheKey to bean instance. */
142-
private final Map<Object, Object> earlyTargetReferences = new ConcurrentHashMap<>(16);
141+
private final Map<Object, Object> earlyBeanReferences = new ConcurrentHashMap<>(16);
143142

144143
private final Map<Object, Class<?>> proxyTypes = new ConcurrentHashMap<>(16);
145144

@@ -266,7 +265,7 @@ public Constructor<?>[] determineCandidateConstructors(Class<?> beanClass, Strin
266265
@Override
267266
public Object getEarlyBeanReference(Object bean, String beanName) {
268267
Object cacheKey = getCacheKey(bean.getClass(), beanName);
269-
this.earlyTargetReferences.put(cacheKey, bean);
268+
this.earlyBeanReferences.put(cacheKey, bean);
270269
return wrapIfNecessary(bean, beanName, cacheKey);
271270
}
272271

@@ -315,7 +314,7 @@ public PropertyValues postProcessProperties(PropertyValues pvs, Object bean, Str
315314
public Object postProcessAfterInitialization(@Nullable Object bean, String beanName) {
316315
if (bean != null) {
317316
Object cacheKey = getCacheKey(bean.getClass(), beanName);
318-
if (this.earlyTargetReferences.remove(cacheKey) != bean) {
317+
if (this.earlyBeanReferences.remove(cacheKey) != bean) {
319318
return wrapIfNecessary(bean, beanName, cacheKey);
320319
}
321320
}

0 commit comments

Comments
 (0)