Skip to content

Commit 5cfd079

Browse files
quaffmhalbritter
authored andcommitted
Remove unnecessary null check
See gh-40963
1 parent 043d71f commit 5cfd079

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)