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

Use default methods on Smart/GenericApplicationListener [SPR-17163] #21699

Closed
spring-projects-issues opened this issue Aug 10, 2018 · 0 comments
Closed
Assignees
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Aug 10, 2018

Stéphane Nicoll opened SPR-17163 and commented

Most implementations of SmartApplicationListener and GenericApplicationListener do not care about the source type so they implement supportsSourceType with return true.

Also, getOrder() is imposed by the contract and may have a default.

The rationale is that this interface is used in case multiple event types are supported and/or you want more fine grained control. Ideally, only the absolutely necessary methods should be implemented, leaving the same default as a regular ApplicationListener implementation.


Affects: 5.0.8

Issue Links:

  • #21723 SmartLifecycle should provide default methods

Referenced from: commits c437a0d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants