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:
parent
d9ee958d88
commit
b5b2add5cf
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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…
Reference in New Issue