Skip to content

ApplicationListenerMethodAdapter: gracefully handle beans which are actually NullBean#23784

Merged
jhoeller merged 1 commit into
spring-projects:masterfrom
stevenschlansker:null-eventlistener-bean
Nov 11, 2019
Merged

ApplicationListenerMethodAdapter: gracefully handle beans which are actually NullBean#23784
jhoeller merged 1 commit into
spring-projects:masterfrom
stevenschlansker:null-eventlistener-bean

Conversation

@stevenschlansker

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

3 participants