Skip to content
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

Rename BeanOverrideStrategy enum constants #33701

Closed
sbrannen opened this issue Oct 14, 2024 · 0 comments
Closed

Rename BeanOverrideStrategy enum constants #33701

sbrannen opened this issue Oct 14, 2024 · 0 comments
Assignees
Labels
in: test Issues in the test module type: enhancement A general enhancement
Milestone

Comments

@sbrannen
Copy link
Member

The enum constants in BeanOverrideStrategy reflect our initial understanding of how the Bean Override feature would work; however, we no longer create or replace BeanDefinitions in general.

We only create a BeanDefinition when the user has requested to override a bean that doesn't exist, and we never replace a BeanDefinition.

Furthermore, the Bean Override feature is not limited to beans that have a BeanDefinition. On the contrary, we actually support overrides for manually registered singletons.

In light of the above, we should rename the enum constants in BeanOverrideStrategy and revise the documentation (Javadoc and reference manual).

I recommend the following renaming.

  • REPLACE_DEFINITIONREPLACE
  • REPLACE_OR_CREATE_DEFINITIONREPLACE_OR_CREATE
  • WRAP_BEANWRAP
@sbrannen sbrannen added in: test Issues in the test module type: enhancement A general enhancement labels Oct 14, 2024
@sbrannen sbrannen added this to the 6.2.0-RC2 milestone Oct 14, 2024
@sbrannen sbrannen self-assigned this Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: test Issues in the test module type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant