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

ApplicationListenerMethodAdapter: gracefully handle beans which are actually NullBean #23784

Merged

Conversation

stevenschlansker
Copy link
Contributor

Currently, if you have an optional event listener (via a @bean method returning null)
this causes the event multicaster to explode violently. Now, we just safely skip it.

…ctually NullBean

Currently, if you have an optional event listener (via a @bean method returning `null`)
this causes the event multicaster to explode violently.  Now, we just safely skip it.
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Oct 11, 2019
@stevenschlansker
Copy link
Contributor Author

Any comments on this fix? We are eagerly anticipating having our code work as expected, and it seems unlikely to cause a regression.

@jhoeller jhoeller self-assigned this Nov 7, 2019
@jhoeller jhoeller added in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Nov 7, 2019
@jhoeller jhoeller added this to the 5.2.2 milestone Nov 7, 2019
@jhoeller jhoeller merged commit fc55e66 into spring-projects:master Nov 11, 2019
jhoeller added a commit that referenced this pull request Nov 11, 2019
@stevenschlansker stevenschlansker deleted the null-eventlistener-bean branch November 11, 2019 17:20
@stevenschlansker
Copy link
Contributor Author

Thank you!

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: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants