Polishing
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -17,6 +17,7 @@
|
||||
package org.springframework.core.env;
|
||||
|
||||
import java.security.AccessControlException;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Map;
|
||||
@@ -250,6 +251,9 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment {
|
||||
@Override
|
||||
public void setActiveProfiles(String... profiles) {
|
||||
Assert.notNull(profiles, "Profile array must not be null");
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Activating profiles " + Arrays.asList(profiles));
|
||||
}
|
||||
synchronized (this.activeProfiles) {
|
||||
this.activeProfiles.clear();
|
||||
for (String profile : profiles) {
|
||||
|
||||
Reference in New Issue
Block a user