Remove redundant invocation of getActiveProfiles
See gh-17271
This commit is contained in:
parent
cca005f756
commit
f86cfff77f
|
|
@ -519,8 +519,6 @@ public class SpringApplication {
|
|||
* @see org.springframework.boot.context.config.ConfigFileApplicationListener
|
||||
*/
|
||||
protected void configureProfiles(ConfigurableEnvironment environment, String[] args) {
|
||||
environment.getActiveProfiles(); // ensure they are initialized
|
||||
// But these ones should go first (last wins in a property key clash)
|
||||
Set<String> profiles = new LinkedHashSet<>(this.additionalProfiles);
|
||||
profiles.addAll(Arrays.asList(environment.getActiveProfiles()));
|
||||
environment.setActiveProfiles(StringUtils.toStringArray(profiles));
|
||||
|
|
|
|||
Loading…
Reference in New Issue