From 476c5bae546bdf565aa66fa1a7df202e9d07fa35 Mon Sep 17 00:00:00 2001 From: Jeremy Landis Date: Sat, 17 Sep 2022 19:51:42 -0400 Subject: [PATCH] [ci] Correct spelling mistake in proxy factory in better way to avoid naming conflict Alternative attempt to #2692 --- .../ibatis/executor/loader/cglib/CglibProxyFactory.java | 6 +++--- .../executor/loader/javassist/JavassistProxyFactory.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/apache/ibatis/executor/loader/cglib/CglibProxyFactory.java b/src/main/java/org/apache/ibatis/executor/loader/cglib/CglibProxyFactory.java index e2b2b21ca77..0c35121c696 100644 --- a/src/main/java/org/apache/ibatis/executor/loader/cglib/CglibProxyFactory.java +++ b/src/main/java/org/apache/ibatis/executor/loader/cglib/CglibProxyFactory.java @@ -66,7 +66,7 @@ public Object createDeserializationProxy(Object target, Map type, Callback callback, List> constructorArgTypes, List constructorArgs) { + static Object createStaticProxy(Class type, Callback callback, List> constructorArgTypes, List constructorArgs) { LogHolder.log.warn("CglibProxyFactory is deprecated. Use another proxy factory implementation."); Enhancer enhancer = new Enhancer(); enhancer.setCallback(callback); @@ -116,7 +116,7 @@ private EnhancedResultObjectProxyImpl(Class type, ResultLoaderMap lazyLoader, public static Object createProxy(Object target, ResultLoaderMap lazyLoader, Configuration configuration, ObjectFactory objectFactory, List> constructorArgTypes, List constructorArgs) { final Class type = target.getClass(); EnhancedResultObjectProxyImpl callback = new EnhancedResultObjectProxyImpl(type, lazyLoader, configuration, objectFactory, constructorArgTypes, constructorArgs); - Object enhanced = crateProxy(type, callback, constructorArgTypes, constructorArgs); + Object enhanced = createStaticProxy(type, callback, constructorArgTypes, constructorArgs); PropertyCopier.copyBeanProperties(type, target, enhanced); return enhanced; } @@ -173,7 +173,7 @@ public static Object createProxy(Object target, Map> constructorArgTypes, List constructorArgs) { final Class type = target.getClass(); EnhancedDeserializationProxyImpl callback = new EnhancedDeserializationProxyImpl(type, unloadedProperties, objectFactory, constructorArgTypes, constructorArgs); - Object enhanced = crateProxy(type, callback, constructorArgTypes, constructorArgs); + Object enhanced = createStaticProxy(type, callback, constructorArgTypes, constructorArgs); PropertyCopier.copyBeanProperties(type, target, enhanced); return enhanced; } diff --git a/src/main/java/org/apache/ibatis/executor/loader/javassist/JavassistProxyFactory.java b/src/main/java/org/apache/ibatis/executor/loader/javassist/JavassistProxyFactory.java index 4a0a8fb8fe4..192277ded1c 100644 --- a/src/main/java/org/apache/ibatis/executor/loader/javassist/JavassistProxyFactory.java +++ b/src/main/java/org/apache/ibatis/executor/loader/javassist/JavassistProxyFactory.java @@ -63,7 +63,7 @@ public Object createDeserializationProxy(Object target, Map type, MethodHandler callback, List> constructorArgTypes, List constructorArgs) { + static Object createStaticProxy(Class type, MethodHandler callback, List> constructorArgTypes, List constructorArgs) { ProxyFactory enhancer = new ProxyFactory(); enhancer.setSuperclass(type); @@ -115,7 +115,7 @@ private EnhancedResultObjectProxyImpl(Class type, ResultLoaderMap lazyLoader, public static Object createProxy(Object target, ResultLoaderMap lazyLoader, Configuration configuration, ObjectFactory objectFactory, List> constructorArgTypes, List constructorArgs) { final Class type = target.getClass(); EnhancedResultObjectProxyImpl callback = new EnhancedResultObjectProxyImpl(type, lazyLoader, configuration, objectFactory, constructorArgTypes, constructorArgs); - Object enhanced = crateProxy(type, callback, constructorArgTypes, constructorArgs); + Object enhanced = createStaticProxy(type, callback, constructorArgTypes, constructorArgs); PropertyCopier.copyBeanProperties(type, target, enhanced); return enhanced; } @@ -172,7 +172,7 @@ public static Object createProxy(Object target, Map> constructorArgTypes, List constructorArgs) { final Class type = target.getClass(); EnhancedDeserializationProxyImpl callback = new EnhancedDeserializationProxyImpl(type, unloadedProperties, objectFactory, constructorArgTypes, constructorArgs); - Object enhanced = crateProxy(type, callback, constructorArgTypes, constructorArgs); + Object enhanced = createStaticProxy(type, callback, constructorArgTypes, constructorArgs); PropertyCopier.copyBeanProperties(type, target, enhanced); return enhanced; }