Browse Source

Narrow early initialization of CGLIB method proxies (for AOT processing)

Do not trigger early initialization on Factory classes (e.g. AOP proxies)

See gh-29107
pull/29282/head
Juergen Hoeller 2 years ago
parent
commit
1b1682eacd
  1. 4
      spring-core/src/main/java/org/springframework/cglib/proxy/MethodProxy.java

4
spring-core/src/main/java/org/springframework/cglib/proxy/MethodProxy.java

@ -57,8 +57,8 @@ public class MethodProxy { @@ -57,8 +57,8 @@ public class MethodProxy {
proxy.createInfo = new CreateInfo(c1, c2);
// SPRING PATCH BEGIN
if (!c1.isInterface() && c1 != Object.class) {
// Try early initialization for overridden methods on subclasses
if (!c1.isInterface() && c1 != Object.class && !Factory.class.isAssignableFrom(c2)) {
// Try early initialization for overridden methods on specifically purposed subclasses
try {
proxy.init();
}

Loading…
Cancel
Save