-
Notifications
You must be signed in to change notification settings - Fork 38.3k
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
supports non-matching generic events
#30399
Labels
Milestone
Comments
spring-projects-issues
added
the
status: waiting-for-triage
An issue we've not yet triaged or decided on
label
Apr 29, 2023
sbrannen
added
type: bug
A general bug
in: core
Issues in core modules (aop, beans, core, context, expression)
labels
Apr 29, 2023
Thanks for reporting the issue, @odrotbohm. It looks like the fallback to |
Yes, I ended up at the same place. Wonder whether this needs to be augmented with at least a raw type assignability check? |
odrotbohm
added a commit
to spring-projects/spring-modulith
that referenced
this issue
Apr 29, 2023
…ractApplicationEventMulticaster. AbstractApplicationEventMulticaster.supportsEvent(…) currently doesn't properly match unresolved, generic ApplicationEvents (see [0]). We now work around this problem by additionally matching the raw event types in a custom override of supportsEvent(…). [0] spring-projects/spring-framework#30399
odrotbohm
added a commit
to spring-projects/spring-modulith
that referenced
this issue
Apr 30, 2023
…ractApplicationEventMulticaster. AbstractApplicationEventMulticaster.supportsEvent(…) currently doesn't properly match unresolved, generic ApplicationEvents (see [0]). We now work around this problem by additionally matching the raw event types in a custom override of supportsEvent(…). [0] spring-projects/spring-framework#30399
simonbasle
removed
the
status: waiting-for-triage
An issue we've not yet triaged or decided on
label
May 10, 2023
odrotbohm
added a commit
to spring-projects/spring-modulith
that referenced
this issue
Jul 17, 2023
… in Spring Framework. Related ticket: GH-186, spring-projects/spring-framework#30399.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ApplicationListenerMethodAdapter
wrongly indicates it would support a generic event type exposing unresolved generics, even if there's no type relationship between the events at all. See the following, failing test case:Note how the adapter signals the event listener method would support
SomeGenericEvent
when it clearly doesn't.The text was updated successfully, but these errors were encountered: