Skip to content

Commit 48688b7

Browse files
committed
Pass getListenerId call on to delegate
See gh-26638
1 parent 1ef8cad commit 48688b7

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

spring-context/src/main/java/org/springframework/context/event/GenericApplicationListenerAdapter.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -64,6 +64,11 @@ public void onApplicationEvent(ApplicationEvent event) {
6464
this.delegate.onApplicationEvent(event);
6565
}
6666

67+
@Override
68+
public String getListenerId() {
69+
return this.delegate.getListenerId();
70+
}
71+
6772
@Override
6873
@SuppressWarnings("unchecked")
6974
public boolean supportsEventType(ResolvableType eventType) {

spring-context/src/main/java/org/springframework/context/event/SourceFilteringListener.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 the original author or authors.
2+
* Copyright 2002-2021 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -74,6 +74,11 @@ public void onApplicationEvent(ApplicationEvent event) {
7474
}
7575
}
7676

77+
@Override
78+
public String getListenerId() {
79+
return (this.delegate != null ? this.delegate.getListenerId() : "");
80+
}
81+
7782
@Override
7883
public boolean supportsEventType(ResolvableType eventType) {
7984
return (this.delegate == null || this.delegate.supportsEventType(eventType));

0 commit comments

Comments
 (0)