Skip to content

Commit

Permalink
Remove deprecated convertEnvironment method
Browse files Browse the repository at this point in the history
  • Loading branch information
philwebb committed Jan 15, 2022
1 parent 9764b3e commit 9c48195
Showing 1 changed file with 2 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -341,26 +341,13 @@ private ConfigurableEnvironment prepareEnvironment(SpringApplicationRunListeners
"Environment prefix cannot be set via properties.");
bindToSpringApplication(environment);
if (!this.isCustomEnvironment) {
environment = convertEnvironment(environment);
EnvironmentConverter environmentConverter = new EnvironmentConverter(getClassLoader());
environment = environmentConverter.convertEnvironmentIfNecessary(environment, deduceEnvironmentClass());
}
ConfigurationPropertySources.attach(environment);
return environment;
}

/**
* Convert the given {@link ConfigurableEnvironment environment} to an application
* environment that doesn't attempt to resolve profile properties directly.
* @param environment the environment to convert
* @return the converted environment
* @since 2.5.7
* @deprecated since 2.5.8 for removal in 2.7.0
*/
@Deprecated
public StandardEnvironment convertEnvironment(ConfigurableEnvironment environment) {
return new EnvironmentConverter(getClassLoader()).convertEnvironmentIfNecessary(environment,
deduceEnvironmentClass());
}

private Class<? extends StandardEnvironment> deduceEnvironmentClass() {
switch (this.webApplicationType) {
case SERVLET:
Expand Down

0 comments on commit 9c48195

Please sign in to comment.