Skip to content

Commit

Permalink
Apply "instanceof pattern matching" in PropertySourcesPlaceholderConf…
Browse files Browse the repository at this point in the history
…igurer

See gh-27947
  • Loading branch information
sbrannen committed Jan 18, 2022
1 parent d72cf89 commit e565d2c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
// local PropertyResolver to enforce that setting, since the Environment is most
// likely not configured with ignoreUnresolvablePlaceholders set to true.
// See https://github.com/spring-projects/spring-framework/issues/27947
if (this.ignoreUnresolvablePlaceholders && (this.environment instanceof ConfigurableEnvironment)) {
ConfigurableEnvironment configurableEnvironment = (ConfigurableEnvironment) this.environment;
if (this.ignoreUnresolvablePlaceholders &&
(this.environment instanceof ConfigurableEnvironment configurableEnvironment)) {
PropertySourcesPropertyResolver resolver =
new PropertySourcesPropertyResolver(configurableEnvironment.getPropertySources());
resolver.setIgnoreUnresolvableNestedPlaceholders(true);
Expand Down

0 comments on commit e565d2c

Please sign in to comment.