- Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement
Milestone
Description
DisposableBeanAdapter historically calls everything other than DisposableBean.destroy() via reflection, including a close() method derived from the standard Closeable/AutoCloseable interface. This is partly due to AutoCloseable being Java 7+ and therefore only reflectively available on the Spring Framework 4.x baseline, partly also due to such a close() invocation being suppressible by the user through specifying an empty destroy method name. While the latter effect is worth preserving, the former can be replaced with a direct invocation after an AutoCloseable cast now. In addition to being more efficient on the JVM, this also avoids reflection metadata having to be available in a GraalVM native image just for that purpose.
sbrannen
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement