Skip to content

Commit 84bcd0e

Browse files
committed
Improve deprecated exception message
Update the exception message so that it includes the class name of the implementation. See gh-22497
1 parent 1c22ec9 commit 84bcd0e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigFileApplicationListener.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,8 @@ public boolean supportsEventType(Class<? extends ApplicationEvent> eventType) {
192192

193193
@Override
194194
public void onApplicationEvent(ApplicationEvent event) {
195-
throw new IllegalStateException(
196-
"ConfigFileApplicationListener is deprecated and can only be used as an EnvironmentPostProcessor");
195+
throw new IllegalStateException("ConfigFileApplicationListener [" + getClass().getName()
196+
+ "] is deprecated and can only be used as an EnvironmentPostProcessor");
197197
}
198198

199199
@Override

0 commit comments

Comments
 (0)