Skip to content

Outdated Javadoc for AbstractApplicationContext.postProcessBeanFactory #29064

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jxblum opened this issue Sep 2, 2022 · 0 comments
Closed

Outdated Javadoc for AbstractApplicationContext.postProcessBeanFactory #29064

jxblum opened this issue Sep 2, 2022 · 0 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: backported An issue that has been backported to maintenance branches type: documentation A documentation task
Milestone

Comments

@jxblum
Copy link

jxblum commented Sep 2, 2022

The Javadoc for the AbstractApplicationContext.postProcessBeanFactory(:ConfigurableListableBeanFactory) method specifically states:

"All bean definitions will have been loaded, but no beans will have been instantiated yet."

While the later is true, the former is no longer true when bean definitions come from @Configuration classes, which won't be processed (i.e. "loaded" & "registered") until the ConfigurationClassPostProcessor is invoked.

Technically, it is a difference between here (the method and Javadoc in question) vs. here (where the ConfigurationClassPostProcessor will eventually be invoked).

As you know, the ConfigurationClassPostProcessor uses the ConfigurationClassBeanDefinitionReader to "load" bean definitions.

At one time, most likely during the days of XML configuration, and before the advent of JavaConfig with @Configuration classes, this statement was probably true. However, now the statement may be a bit misleading for framework developers building extensions to the framework, such as an ApplicationContext implementation extending from AbstractApplicationContext.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Sep 2, 2022
@jxblum jxblum changed the title Incorrect statement in the Javadoc for AbstractApplicationContext.postProcessBeanFactory(:ConfigurableListableBeanFactory) method Error in the Javadoc for AbstractApplicationContext.postProcessBeanFactory(:ConfigurableListableBeanFactory) Sep 2, 2022
@snicoll snicoll added type: documentation A documentation task and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Sep 5, 2022
@snicoll snicoll added this to the 5.3.x milestone Sep 5, 2022
@jhoeller jhoeller self-assigned this Feb 1, 2023
@jhoeller jhoeller added the in: core Issues in core modules (aop, beans, core, context, expression) label Feb 1, 2023
@jhoeller jhoeller modified the milestones: 5.3.x, 6.0.5 Feb 1, 2023
@jhoeller jhoeller changed the title Error in the Javadoc for AbstractApplicationContext.postProcessBeanFactory(:ConfigurableListableBeanFactory) Outdated Javadoc for AbstractApplicationContext.postProcessBeanFactory(:ConfigurableListableBeanFactory) Feb 1, 2023
@jhoeller jhoeller changed the title Outdated Javadoc for AbstractApplicationContext.postProcessBeanFactory(:ConfigurableListableBeanFactory) Outdated Javadoc for AbstractApplicationContext.postProcessBeanFactory Feb 1, 2023
@github-actions github-actions bot added status: backported An issue that has been backported to maintenance branches and removed for: backport-to-5.3.x labels Feb 1, 2023
jhoeller added a commit that referenced this issue Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: backported An issue that has been backported to maintenance branches type: documentation A documentation task
Projects
None yet
Development

No branches or pull requests

4 participants