mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Remove unnecessary null check
See gh-40963
This commit is contained in:
parent
043d71f820
commit
5cfd079c55
@ -87,7 +87,7 @@ public final class ConfigurationPropertySources {
|
|||||||
Assert.isInstanceOf(ConfigurableEnvironment.class, environment);
|
Assert.isInstanceOf(ConfigurableEnvironment.class, environment);
|
||||||
MutablePropertySources sources = ((ConfigurableEnvironment) environment).getPropertySources();
|
MutablePropertySources sources = ((ConfigurableEnvironment) environment).getPropertySources();
|
||||||
PropertySource<?> attached = getAttached(sources);
|
PropertySource<?> attached = getAttached(sources);
|
||||||
if (attached == null || !isUsingSources(attached, sources)) {
|
if (!isUsingSources(attached, sources)) {
|
||||||
attached = new ConfigurationPropertySourcesPropertySource(ATTACHED_PROPERTY_SOURCE_NAME,
|
attached = new ConfigurationPropertySourcesPropertySource(ATTACHED_PROPERTY_SOURCE_NAME,
|
||||||
new SpringConfigurationPropertySources(sources));
|
new SpringConfigurationPropertySources(sources));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user