-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement
Milestone
Description
Paul Benedict opened SPR-4610 and commented
It would be fantastic if ApplicationListener could be genericized so that the event argument automatically becomes the parameterized type. Maybe worth looking at in 3.0? In any event (pun intended), the framework could then skip over invoking the handler if the typed argument is not the correct type. This would eliminate the boilerplate of "if (event instanceof MySubclassEvent)" checks.
Can anything be done like this in 2.5?
Affects: 2.5.2
1 votes, 1 watchers
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement