Merge branch '6.0.x'

This commit is contained in:
Juergen Hoeller
2023-10-23 17:34:45 +02:00
7 changed files with 70 additions and 41 deletions

View File

@@ -265,18 +265,32 @@ public class ProxyFactoryBean extends ProxyCreatorSupport
* Return the type of the proxy. Will check the singleton instance if
* already created, else fall back to the proxy interface (in case of just
* a single one), the target bean type, or the TargetSource's target class.
* @see org.springframework.aop.TargetSource#getTargetClass
* @see org.springframework.aop.framework.AopProxy#getProxyClass
*/
@Override
@Nullable
public Class<?> getObjectType() {
synchronized (this) {
if (this.singletonInstance != null) {
return this.singletonInstance.getClass();
}
}
// This might be incomplete since it potentially misses introduced interfaces
// from Advisors that will be lazily retrieved via setInterceptorNames.
return createAopProxy().getProxyClass(this.proxyClassLoader);
try {
// This might be incomplete since it potentially misses introduced interfaces
// from Advisors that will be lazily retrieved via setInterceptorNames.
return createAopProxy().getProxyClass(this.proxyClassLoader);
}
catch (AopConfigException ex) {
if (getTargetClass() == null) {
if (logger.isDebugEnabled()) {
logger.debug("Failed to determine early proxy class: " + ex.getMessage());
}
return null;
}
else {
throw ex;
}
}
}
@Override

View File

@@ -136,7 +136,6 @@ public abstract class ClassFilters {
public String toString() {
return getClass().getName() + ": " + Arrays.toString(this.filters);
}
}
@@ -177,7 +176,6 @@ public abstract class ClassFilters {
public String toString() {
return getClass().getName() + ": " + Arrays.toString(this.filters);
}
}