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

Injection point using ObjectProvider should not apply bean by name fallback for orderedStream #32326

Closed
snicoll opened this issue Feb 24, 2024 · 0 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: task A general task
Milestone

Comments

@snicoll
Copy link
Member

snicoll commented Feb 24, 2024

Consider an ApplicationContext with three instances of TestBean named: testBean, anotherTestBean, and someTestBean using the following injection point:

class Example {

  Example(ObjectProvider<TestBean> testBean) {
    testBean.orderedStream().....
  }

Current 6.2.x has a regression that it apparently applies the bean by name shortcut, resulting in a stream with a single instance (the one named testBean). Using ConfigurableApplicationContext#getBeanProvider(TestBean.class) works as expected and return the three configured instances.

@snicoll snicoll added type: task A general task in: core Issues in core modules (aop, beans, core, context, expression) labels Feb 24, 2024
@snicoll snicoll added this to the 6.2.0-M1 milestone Feb 24, 2024
@jhoeller jhoeller self-assigned this Feb 24, 2024
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) type: task A general task
Projects
None yet
Development

No branches or pull requests

2 participants