Skip to content

Commit 38f21a1

Browse files
committed
Merge pull request #17271 from chenqimiao
* gh-17271: Remove redundant invocation of getActiveProfiles Closes gh-17271
2 parents cca005f + f86cfff commit 38f21a1

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,8 +519,6 @@ protected void configurePropertySources(ConfigurableEnvironment environment, Str
519519
* @see org.springframework.boot.context.config.ConfigFileApplicationListener
520520
*/
521521
protected void configureProfiles(ConfigurableEnvironment environment, String[] args) {
522-
environment.getActiveProfiles(); // ensure they are initialized
523-
// But these ones should go first (last wins in a property key clash)
524522
Set<String> profiles = new LinkedHashSet<>(this.additionalProfiles);
525523
profiles.addAll(Arrays.asList(environment.getActiveProfiles()));
526524
environment.setActiveProfiles(StringUtils.toStringArray(profiles));

0 commit comments

Comments
 (0)