Polish restoration of ConfigFileApplicationListener

See gh-27303
pull/27357/head
Andy Wilkinson 3 years ago
parent b39ed7f086
commit 8540bc0d12

@ -129,6 +129,7 @@ public class ConfigDataEnvironmentPostProcessor implements EnvironmentPostProces
getLegacyListener().addPropertySources(environment, resourceLoader);
}
@SuppressWarnings("deprecation")
LegacyConfigFileApplicationListener getLegacyListener() {
return new LegacyConfigFileApplicationListener(this.logFactory.getLog(ConfigFileApplicationListener.class));
}
@ -200,6 +201,7 @@ public class ConfigDataEnvironmentPostProcessor implements EnvironmentPostProces
postProcessor.postProcessEnvironment(environment, resourceLoader, additionalProfiles);
}
@SuppressWarnings("deprecation")
static class LegacyConfigFileApplicationListener extends ConfigFileApplicationListener {
LegacyConfigFileApplicationListener(Log logger) {

@ -71,6 +71,7 @@ class ConfigDataEnvironmentPostProcessorTests {
private ArgumentCaptor<ResourceLoader> resourceLoaderCaptor;
@Test
@Deprecated
void defaultOrderMatchesDeprecatedListener() {
assertThat(ConfigDataEnvironmentPostProcessor.ORDER).isEqualTo(ConfigFileApplicationListener.DEFAULT_ORDER);
}

@ -72,6 +72,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
* @author Scott Frederick
* @author Nguyen Bao Sach
*/
@Deprecated
@ExtendWith({ OutputCaptureExtension.class, UseLegacyProcessing.class })
class ConfigFileApplicationListenerTests {

Loading…
Cancel
Save