Browse Source

Rename {DEFAULT_=>}COMMAND_LINE_PROPERTY_SOURCE_NAME

For consistency with all other constants representing default
property source names, such as
StandardServletEnvironment#SERVLET_CONTEXT_PROPERTY_SOURCE_NAME and
StandardEnvironment#SYSTEM_ENVIRONMENT_PROPERTY_SOURCE_NAME

Issue: SPR-8482

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4649 50f2f4bb-b051-0410-bef5-90022cba6387
pull/1/merge
Chris Beams 15 years ago
parent
commit
e4c1be808f
  1. 6
      org.springframework.core/src/main/java/org/springframework/core/env/CommandLinePropertySource.java
  2. 2
      org.springframework.core/src/main/java/org/springframework/core/env/JOptCommandLinePropertySource.java
  3. 2
      org.springframework.core/src/main/java/org/springframework/core/env/SimpleCommandLinePropertySource.java
  4. 2
      org.springframework.core/src/test/java/org/springframework/core/env/SimpleCommandLinePropertySourceTests.java

6
org.springframework.core/src/main/java/org/springframework/core/env/CommandLinePropertySource.java vendored

@ -188,7 +188,7 @@ import org.springframework.util.StringUtils; @@ -188,7 +188,7 @@ import org.springframework.util.StringUtils;
public abstract class CommandLinePropertySource<T> extends PropertySource<T> {
/** The default name given to {@link CommandLinePropertySource} instances: {@value} */
public static final String DEFAULT_COMMAND_LINE_PROPERTY_SOURCE_NAME = "commandLineArgs";
public static final String COMMAND_LINE_PROPERTY_SOURCE_NAME = "commandLineArgs";
/** The default name of the property representing non-option arguments: {@value} */
public static final String DEFAULT_NON_OPTION_ARGS_PROPERTY_NAME = "nonOptionArgs";
@ -197,10 +197,10 @@ public abstract class CommandLinePropertySource<T> extends PropertySource<T> { @@ -197,10 +197,10 @@ public abstract class CommandLinePropertySource<T> extends PropertySource<T> {
/**
* Create a new {@code CommandLinePropertySource} having the default name {@value
* #DEFAULT_COMMAND_LINE_PROPERTY_SOURCE_NAME} and backed by the given source object.
* #COMMAND_LINE_PROPERTY_SOURCE_NAME} and backed by the given source object.
*/
public CommandLinePropertySource(T source) {
super(DEFAULT_COMMAND_LINE_PROPERTY_SOURCE_NAME, source);
super(COMMAND_LINE_PROPERTY_SOURCE_NAME, source);
}
/**

2
org.springframework.core/src/main/java/org/springframework/core/env/JOptCommandLinePropertySource.java vendored

@ -57,7 +57,7 @@ public class JOptCommandLinePropertySource extends CommandLinePropertySource<Opt @@ -57,7 +57,7 @@ public class JOptCommandLinePropertySource extends CommandLinePropertySource<Opt
/**
* Create a new {@code JOptCommandLinePropertySource} having the default name
* and backed by the given {@code OptionSet}.
* @see CommandLinePropertySource#DEFAULT_COMMAND_LINE_PROPERTY_SOURCE_NAME
* @see CommandLinePropertySource#COMMAND_LINE_PROPERTY_SOURCE_NAME
* @see CommandLinePropertySource#CommandLinePropertySource(Object)
*/
public JOptCommandLinePropertySource(OptionSet options) {

2
org.springframework.core/src/main/java/org/springframework/core/env/SimpleCommandLinePropertySource.java vendored

@ -80,7 +80,7 @@ public class SimpleCommandLinePropertySource extends CommandLinePropertySource<C @@ -80,7 +80,7 @@ public class SimpleCommandLinePropertySource extends CommandLinePropertySource<C
/**
* Create a new {@code SimpleCommandLinePropertySource} having the default name
* and backed by the given {@code String[]} of command line arguments.
* @see CommandLinePropertySource#DEFAULT_COMMAND_LINE_PROPERTY_SOURCE_NAME
* @see CommandLinePropertySource#COMMAND_LINE_PROPERTY_SOURCE_NAME
* @see CommandLinePropertySource#CommandLinePropertySource(Object)
*/
public SimpleCommandLinePropertySource(String... args) {

2
org.springframework.core/src/test/java/org/springframework/core/env/SimpleCommandLinePropertySourceTests.java vendored

@ -37,7 +37,7 @@ public class SimpleCommandLinePropertySourceTests { @@ -37,7 +37,7 @@ public class SimpleCommandLinePropertySourceTests {
public void withDefaultName() {
PropertySource<?> ps = new SimpleCommandLinePropertySource();
assertThat(ps.getName(),
equalTo(CommandLinePropertySource.DEFAULT_COMMAND_LINE_PROPERTY_SOURCE_NAME));
equalTo(CommandLinePropertySource.COMMAND_LINE_PROPERTY_SOURCE_NAME));
}
@Test

Loading…
Cancel
Save