Skip to content

Commit c8c0737

Browse files
committed
AbstractApplicationContext.getApplicationListeners() exposes all statically registered listeners
Issue: SPR-17324
1 parent 19f3347 commit c8c0737

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
@@ -498,9 +498,7 @@ public void addApplicationListener(ApplicationListener<?> listener) {
498498
if (this.applicationEventMulticaster != null) {
499499
this.applicationEventMulticaster.addApplicationListener(listener);
500500
}
501-
else {
502-
this.applicationListeners.add(listener);
503-
}
501+
this.applicationListeners.add(listener);
504502
}
505503

506504
/**

0 commit comments

Comments
 (0)