Browse Source

Pass getListenerId call on to delegate

See gh-26638
pull/26658/head
Juergen Hoeller 4 years ago
parent
commit
48688b7b04
  1. 7
      spring-context/src/main/java/org/springframework/context/event/GenericApplicationListenerAdapter.java
  2. 7
      spring-context/src/main/java/org/springframework/context/event/SourceFilteringListener.java

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

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -64,6 +64,11 @@ public class GenericApplicationListenerAdapter implements GenericApplicationList @@ -64,6 +64,11 @@ public class GenericApplicationListenerAdapter implements GenericApplicationList
this.delegate.onApplicationEvent(event);
}
@Override
public String getListenerId() {
return this.delegate.getListenerId();
}
@Override
@SuppressWarnings("unchecked")
public boolean supportsEventType(ResolvableType eventType) {

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

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -74,6 +74,11 @@ public class SourceFilteringListener implements GenericApplicationListener, Smar @@ -74,6 +74,11 @@ public class SourceFilteringListener implements GenericApplicationListener, Smar
}
}
@Override
public String getListenerId() {
return (this.delegate != null ? this.delegate.getListenerId() : "");
}
@Override
public boolean supportsEventType(ResolvableType eventType) {
return (this.delegate == null || this.delegate.supportsEventType(eventType));

Loading…
Cancel
Save