Commit 834aa093 authored by Phillip Webb's avatar Phillip Webb

Remove ConfigurationProperySource

Remove `ConfigurationProperySource` from `PropertySourcesPropertyValues`
so that the deprecated code to continues to work.

See gh-4910
parent 16f9ef4f
......@@ -25,8 +25,10 @@ import java.util.regex.Pattern;
import org.springframework.beans.MutablePropertyValues;
import org.springframework.beans.PropertyValue;
import org.springframework.beans.PropertyValues;
import org.springframework.boot.context.properties.source.ConfigurationPropertySources;
import org.springframework.core.env.CompositePropertySource;
import org.springframework.core.env.EnumerablePropertySource;
import org.springframework.core.env.MutablePropertySources;
import org.springframework.core.env.PropertySource;
import org.springframework.core.env.PropertySources;
import org.springframework.core.env.PropertySourcesPropertyResolver;
......@@ -108,6 +110,10 @@ public class PropertySourcesPropertyValues implements PropertyValues {
PropertyNamePatternsMatcher includes, boolean resolvePlaceholders) {
Assert.notNull(propertySources, "PropertySources must not be null");
Assert.notNull(includes, "Includes must not be null");
MutablePropertySources mutablePropertySources = new MutablePropertySources(
propertySources);
mutablePropertySources.remove(ConfigurationPropertySources.PROPERTY_SOURCE_NAME);
propertySources = mutablePropertySources;
this.propertySources = propertySources;
this.nonEnumerableFallbackNames = nonEnumerableFallbackNames;
this.includes = includes;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment