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
This commit is contained in:
Chris Beams 2011-07-02 21:39:52 +00:00
parent d9ee958d88
commit b5b2add5cf
4 changed files with 6 additions and 6 deletions

View File

@ -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> {
/**
* 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);
}
/**

View File

@ -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) {

View File

@ -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) {

View File

@ -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