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

Retrofit events for generics matching of ApplicationEvent subtypes with generic payload parameter #4415

Open
mp911de opened this issue Jun 13, 2023 · 1 comment
Labels
type: enhancement A general enhancement

Comments

@mp911de
Copy link
Member

mp911de commented Jun 13, 2023

See spring-projects/spring-framework#17661

@mp911de mp911de added the type: enhancement A general enhancement label Jun 13, 2023
@mp911de
Copy link
Member Author

mp911de commented Jun 13, 2023

A side effect here is that listeners accepting Object (e.g. ApplicationListener<AfterSaveEvent<Object>>) no longer match any subtype because of the refined type matching. Instead, these listeners need to be defined as ApplicationListener<AfterSaveEvent<? extends Object>> which is actually the correct version according to generics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant