Skip to content

Commit 5b0c355

Browse files
authored
Merge pull request #214 from sjsajj/master
Fix for Java 5 and 6 JVMs
2 parents 9619885 + f3ce178 commit 5b0c355

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/main/java/picocli/CommandLine.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
import java.util.LinkedList;
5353
import java.util.List;
5454
import java.util.Map;
55-
import java.util.Objects;
5655
import java.util.Queue;
5756
import java.util.Set;
5857
import java.util.SortedSet;
@@ -4562,11 +4561,11 @@ public static class ExecutionException extends PicocliException {
45624561
private final CommandLine commandLine;
45634562
public ExecutionException(CommandLine commandLine, String msg) {
45644563
super(msg);
4565-
this.commandLine = Objects.requireNonNull(commandLine, "commandLine");
4564+
this.commandLine = Assert.notNull(commandLine, "commandLine");
45664565
}
45674566
public ExecutionException(CommandLine commandLine, String msg, Exception ex) {
45684567
super(msg, ex);
4569-
this.commandLine = Objects.requireNonNull(commandLine, "commandLine");
4568+
this.commandLine = Assert.notNull(commandLine, "commandLine");
45704569
}
45714570
/** Returns the {@code CommandLine} object for the (sub)command that could not be invoked.
45724571
* @return the {@code CommandLine} object for the (sub)command where invocation failed.
@@ -4590,7 +4589,7 @@ public static class ParameterException extends PicocliException {
45904589
* @since 2.0 */
45914590
public ParameterException(CommandLine commandLine, String msg) {
45924591
super(msg);
4593-
this.commandLine = Objects.requireNonNull(commandLine, "commandLine");
4592+
this.commandLine = Assert.notNull(commandLine, "commandLine");
45944593
}
45954594
/** Constructs a new ParameterException with the specified CommandLine and error message.
45964595
* @param commandLine the command or subcommand whose input was invalid
@@ -4599,7 +4598,7 @@ public ParameterException(CommandLine commandLine, String msg) {
45994598
* @since 2.0 */
46004599
public ParameterException(CommandLine commandLine, String msg, Exception ex) {
46014600
super(msg, ex);
4602-
this.commandLine = Objects.requireNonNull(commandLine, "commandLine");
4601+
this.commandLine = Assert.notNull(commandLine, "commandLine");
46034602
}
46044603

46054604
/** Returns the {@code CommandLine} object for the (sub)command whose input could not be parsed.

0 commit comments

Comments
 (0)