Merge branch '2.1.x'

This commit is contained in:
Spencer Gibb
2019-12-17 17:18:01 -05:00
2 changed files with 7 additions and 2 deletions

2
.gitignore vendored
View File

@@ -20,4 +20,4 @@ _site/
/spring-cloud-release-tools*.jar
antrun
.vscode/
.flattened-pom.xml
.flattened-pom.xml

View File

@@ -44,7 +44,12 @@ public interface PropertySourceLocator {
PropertySource<?> locate(Environment environment);
default Collection<PropertySource<?>> locateCollection(Environment environment) {
PropertySource<?> propertySource = locate(environment);
return locateCollection(this, environment);
}
static Collection<PropertySource<?>> locateCollection(PropertySourceLocator locator,
Environment environment) {
PropertySource<?> propertySource = locator.locate(environment);
if (propertySource == null) {
return Collections.emptyList();
}