Skip to content

Commit ee490fe

Browse files
quaffryanjbaxter
authored andcommitted
Move field ContextRefresher.REFRESH_ARGS_PROPERTY_SOURCE down to LegacyContextRefresher (#1450)
It's specific to LegacyContextRefresher. Signed-off-by: Yanming Zhou <[email protected]>
1 parent 94f22fd commit ee490fe

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

spring-cloud-context/src/main/java/org/springframework/cloud/context/refresh/ConfigDataContextRefresher.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,6 @@ protected void updateEnvironment() {
9292
postProcessor.postProcessEnvironment(environment, application);
9393
}
9494

95-
if (environment.getPropertySources().contains(REFRESH_ARGS_PROPERTY_SOURCE)) {
96-
environment.getPropertySources().remove(REFRESH_ARGS_PROPERTY_SOURCE);
97-
}
9895
MutablePropertySources target = getContext().getEnvironment().getPropertySources();
9996
String targetName = null;
10097
for (PropertySource<?> source : environment.getPropertySources()) {

spring-cloud-context/src/main/java/org/springframework/cloud/context/refresh/ContextRefresher.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ public abstract class ContextRefresher {
5151

5252
protected final Log logger = LogFactory.getLog(getClass());
5353

54-
protected static final String REFRESH_ARGS_PROPERTY_SOURCE = "refreshArgs";
55-
5654
protected static final String[] DEFAULT_PROPERTY_SOURCES = new String[] {
5755
// order matters, if cli args aren't first, things get messy
5856
CommandLinePropertySource.COMMAND_LINE_PROPERTY_SOURCE_NAME, "defaultProperties" };

spring-cloud-context/src/main/java/org/springframework/cloud/context/refresh/LegacyContextRefresher.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
*/
4242
public class LegacyContextRefresher extends ContextRefresher {
4343

44+
private static final String REFRESH_ARGS_PROPERTY_SOURCE = "refreshArgs";
45+
4446
@Deprecated
4547
public LegacyContextRefresher(ConfigurableApplicationContext context, RefreshScope scope) {
4648
super(context, scope);

0 commit comments

Comments
 (0)