You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
This is on the plan for Spring 3.0 M1 in June. I'm afraid there won't be any such support in the 2.5 series since we're about to focus all our new feature efforts on 3.0 M1/M2. Furthermore, implementing such generically typed listener detection isn't completely trivial due to Java's half-baked support for reflective analysis of generic declaration.
FYI, we're aiming for a 3.0 RC1 in August, so a production version of this is hopefully not too far away...
Activity
spring-projects-issues commentedon Mar 22, 2008
Juergen Hoeller commented
This is on the plan for Spring 3.0 M1 in June. I'm afraid there won't be any such support in the 2.5 series since we're about to focus all our new feature efforts on 3.0 M1/M2. Furthermore, implementing such generically typed listener detection isn't completely trivial due to Java's half-baked support for reflective analysis of generic declaration.
FYI, we're aiming for a 3.0 RC1 in August, so a production version of this is hopefully not too far away...
Juergen