Improve deprecated exception message

Update the exception message so that it includes the class name of the
implementation.

See gh-22497
This commit is contained in:
Phillip Webb 2020-07-27 09:06:33 -07:00
parent 1c22ec9373
commit 84bcd0eb1e
1 changed files with 2 additions and 2 deletions

View File

@ -192,8 +192,8 @@ public class ConfigFileApplicationListener implements EnvironmentPostProcessor,
@Override @Override
public void onApplicationEvent(ApplicationEvent event) { public void onApplicationEvent(ApplicationEvent event) {
throw new IllegalStateException( throw new IllegalStateException("ConfigFileApplicationListener [" + getClass().getName()
"ConfigFileApplicationListener is deprecated and can only be used as an EnvironmentPostProcessor"); + "] is deprecated and can only be used as an EnvironmentPostProcessor");
} }
@Override @Override