Make sure property mapping exception are swallowed

This commit is contained in:
Madhura Bhave 2018-04-03 16:12:24 -07:00
parent e5f8078749
commit 30e3cf4c01
1 changed files with 2 additions and 1 deletions

View File

@ -77,7 +77,8 @@ class SpringConfigurationPropertySource implements ConfigurationPropertySource {
Assert.notNull(propertySource, "PropertySource must not be null");
Assert.notNull(mapper, "Mapper must not be null");
this.propertySource = propertySource;
this.mapper = mapper;
this.mapper = (mapper instanceof DelegatingPropertyMapper ? mapper
: new DelegatingPropertyMapper(mapper));
this.containsDescendantOf = (containsDescendantOf != null ? containsDescendantOf
: (n) -> ConfigurationPropertyState.UNKNOWN);
}