Skip to content

Commit 79820e4

Browse files
committed
ConfigurationClassEnhancer consistently uses registerStaticCallbacks in order to prevent memory leaks
Issue: SPR-9274
1 parent 2f5d378 commit 79820e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassEnhancer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ private Object enhanceFactoryBean(Class<?> fbClass, String beanName) throws Inst
360360
};
361361
enhancer.setCallbackTypes(CALLBACK_TYPES);
362362
Class<?> fbSubclass = enhancer.createClass();
363-
Enhancer.registerCallbacks(fbSubclass, callbackInstances);
363+
Enhancer.registerStaticCallbacks(fbSubclass, callbackInstances);
364364
return fbSubclass.newInstance();
365365
}
366366
}

0 commit comments

Comments
 (0)