Skip to content

Commit 4acbb12

Browse files
committed
Polishing.
Tweak naming. Original pull request: #4352 See #4351
1 parent b89c4cd commit 4acbb12

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

spring-data-mongodb/src/main/java/org/springframework/data/mongodb/aot/LazyLoadingProxyAotProcessor.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public void registerLazyLoadingProxyIfNeeded(Class<?> type, GenerationContext ge
7474
} else {
7575

7676
Class<?> proxyClass = LazyLoadingProxyFactory.resolveProxyType(field.getType(),
77-
() -> LazyLoadingInterceptor.none());
77+
LazyLoadingInterceptor::none);
7878

7979
// see: spring-projects/spring-framework/issues/29309
8080
generationContext.getRuntimeHints().reflection().registerType(proxyClass,

spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/convert/LazyLoadingProxyFactory.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public LazyLoadingProxyFactory(PersistenceExceptionTranslator exceptionTranslato
7272
/**
7373
* Predict the proxy target type. This will advice the infrastructure to resolve as many pieces as possible in a
7474
* potential AOT scenario without necessarily resolving the entire object.
75-
*
75+
*
7676
* @param propertyType the type to proxy
7777
* @param interceptor the interceptor to be added.
7878
* @return the proxy type.
@@ -93,20 +93,20 @@ public static Class<?> resolveProxyType(Class<?> propertyType, Supplier<LazyLoad
9393
/**
9494
* Create the {@link ProxyFactory} for the given type, already adding required additional interfaces.
9595
*
96-
* @param propertyType the type to proxy
97-
* @return the proxy type.
96+
* @param targetType the type to proxy.
97+
* @return the prepared {@link ProxyFactory}.
9898
* @since 4.0.5
9999
*/
100-
public static ProxyFactory prepareFactory(Class<?> propertyType) {
100+
public static ProxyFactory prepareFactory(Class<?> targetType) {
101101

102102
ProxyFactory proxyFactory = new ProxyFactory();
103103

104-
for (Class<?> type : propertyType.getInterfaces()) {
104+
for (Class<?> type : targetType.getInterfaces()) {
105105
proxyFactory.addInterface(type);
106106
}
107107

108108
proxyFactory.addInterface(LazyLoadingProxy.class);
109-
proxyFactory.addInterface(propertyType);
109+
proxyFactory.addInterface(targetType);
110110

111111
return proxyFactory;
112112
}

spring-data-mongodb/src/test/java/org/springframework/data/mongodb/aot/LazyLoadingProxyAotProcessorUnitTests.java

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
import org.springframework.javapoet.ClassName;
3030

3131
/**
32+
* Unit tests for {@link LazyLoadingProxyAotProcessor}.
33+
*
3234
* @author Christoph Strobl
3335
*/
3436
class LazyLoadingProxyAotProcessorUnitTests {

0 commit comments

Comments
 (0)