Skip to content

Commit 8a7d670

Browse files
committed
Merge pull request #40963 from quaff
* pr/40963: Remove unnecessary null check Closes gh-40963
2 parents 043d71f + 5cfd079 commit 8a7d670

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/source/ConfigurationPropertySources.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public static void attach(Environment environment) {
8787
Assert.isInstanceOf(ConfigurableEnvironment.class, environment);
8888
MutablePropertySources sources = ((ConfigurableEnvironment) environment).getPropertySources();
8989
PropertySource<?> attached = getAttached(sources);
90-
if (attached == null || !isUsingSources(attached, sources)) {
90+
if (!isUsingSources(attached, sources)) {
9191
attached = new ConfigurationPropertySourcesPropertySource(ATTACHED_PROPERTY_SOURCE_NAME,
9292
new SpringConfigurationPropertySources(sources));
9393
}

0 commit comments

Comments
 (0)