Closed
Description
Sam Brannen opened SPR-12410 and commented
Status Quo
AbstractApplicationEventMulticaster
currently sorts ApplicationListener
instances based on the Ordered
interface, but the sorting algorithm does not honor annotations.
At the time of this writing, there are two invocations of OrderComparator.sort()
within AbstractApplicationEventMulticaster
.
Proposal
Refactor AbstractApplicationEventMulticaster
to use AnnotationAwareOrderComparator.sort()
instead of OrderComparator.sort()
.
Affects: 3.0 GA
Issue Links:
- AbstractApplicationEventMulticaster does not sort listeners using @Order [SPR-10057] #14690 AbstractApplicationEventMulticaster does not sort listeners using
@Order
("is duplicated by") - ApplicationListener-like annotation for consuming application events [SPR-11622] #16245 ApplicationListener-like annotation for consuming application events
- @Order annotations not consistently honored within DispatcherServlet and other parts of the framework [SPR-12806] #17403
@Order
annotations not consistently honored within DispatcherServlet and other parts of the framework
Referenced from: commits 8eb7bee