Commit e2d5dfad authored by artsiom's avatar artsiom Committed by Stephane Nicoll

Use varargs for DefaultApplicationArguments

Closes gh-15142
parent 389ab957
...@@ -37,7 +37,7 @@ public class DefaultApplicationArguments implements ApplicationArguments { ...@@ -37,7 +37,7 @@ public class DefaultApplicationArguments implements ApplicationArguments {
private final String[] args; private final String[] args;
public DefaultApplicationArguments(String[] args) { public DefaultApplicationArguments(String... args) {
Assert.notNull(args, "Args must not be null"); Assert.notNull(args, "Args must not be null");
this.source = new Source(args); this.source = new Source(args);
this.args = args; this.args = args;
......
...@@ -80,8 +80,7 @@ public class DefaultApplicationArgumentsTests { ...@@ -80,8 +80,7 @@ public class DefaultApplicationArgumentsTests {
@Test @Test
public void getNoNonOptionArgs() { public void getNoNonOptionArgs() {
ApplicationArguments arguments = new DefaultApplicationArguments( ApplicationArguments arguments = new DefaultApplicationArguments("--debug");
new String[] { "--debug" });
assertThat(arguments.getNonOptionArgs()).isEmpty(); assertThat(arguments.getNonOptionArgs()).isEmpty();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment