Skip to content

Deprecate inappropriate getBeanFactory() method in AbstractBeanDefinitionReader #27875

Closed
@Mozartaa

Description

@Mozartaa

in spring5.3.10 version
A public method is provided in the AbstractBeanDefinitionReader class,

public final BeanDefinitionRegistry getBeanFactory() {
     return this.registry;
}

This method does not have any notes, and the type returned is a BeanDefinitionRegistry, but the method name is getBeanFactory. However, BeanDefinitionRegistry doesn't extends BeanFactory, so naming it is easy to mislead everyone, getRegistry() method has been provided,
So I think the getBeanFactory method should be removed.
image

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