Skip to content

Commit d61a7ed

Browse files
committed
AbstractApplicationContext.getApplicationListeners() exposes all statically registered listeners
Issue: SPR-17324 (cherry picked from commit c8c0737)
1 parent ca0ce7d commit d61a7ed

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

spring-context/src/main/java/org/springframework/context/support/AbstractApplicationContext.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -500,9 +500,7 @@ public void addApplicationListener(ApplicationListener<?> listener) {
500500
if (this.applicationEventMulticaster != null) {
501501
this.applicationEventMulticaster.addApplicationListener(listener);
502502
}
503-
else {
504-
this.applicationListeners.add(listener);
505-
}
503+
this.applicationListeners.add(listener);
506504
}
507505

508506
/**

0 commit comments

Comments
 (0)