Genericize ApplicationListener [SPR-4610] #9287
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
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
The text was updated successfully, but these errors were encountered: