Skip to content

Skip initialization of a NullBean #35165

Closed
@sbrannen

Description

@sbrannen

In AbstractAutowireCapableBeanFactory, initializeBean() currently attempts to initialize a NullBean.

However, invokeInitMethods() (which is invoked by initializeBean()) skips processing of a NullBean with a bean.getClass() != NullBean.class check, which is logical since a NullBean will never contain init-methods.

In practice, initialization and post-processing of a NullBean should not result in any change to the NullBean, thus we should simply skip initialization of a NullBean altogether.

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions