You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PropertySourcesPropertyValues.processPropertySource does the following:
private void processPropertySource(PropertySource<?> source,
PropertySourcesPropertyResolver resolver,
PropertyNamePatternsMatcher includes, Collection<String> exacts) {
if (source instanceof EnumerablePropertySource) {
processEnumerablePropertySource((EnumerablePropertySource<?>) source,
resolver, includes, exacts);
}
else if (source instanceof CompositePropertySource) {
processCompositePropertySource((CompositePropertySource) source, resolver,
includes, exacts);
}
else {
// We can only do exact matches for non-enumerable property names, but
// that's better than nothing...
processDefaultPropertySource(source, resolver, includes, exacts);
}
}
Since Spring 4.1.2, CompositePropertySource extends EnumerablePropertySource.
There are two issues with it:
The second branch of the condition (first "else") is never executed (dead code).
CompositePropertySource does not actually fulfil the specification of EnumerablePropertySource. It may contain a non-enumerable property source in which case getPropertyNames does not in fact list all the properties.
The latter is arguably an issue in Spring core. But it has negative effect on Spring Boot as well, so it probably should be fixed in the core or worked around in Boot.
The text was updated successfully, but these errors were encountered:
PropertySourcesPropertyValues.processPropertySource
does the following:Since Spring 4.1.2,
CompositePropertySource
extendsEnumerablePropertySource
.There are two issues with it:
CompositePropertySource
does not actually fulfil the specification ofEnumerablePropertySource
. It may contain a non-enumerable property source in which casegetPropertyNames
does not in fact list all the properties.The latter is arguably an issue in Spring core. But it has negative effect on Spring Boot as well, so it probably should be fixed in the core or worked around in Boot.
The text was updated successfully, but these errors were encountered: