Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Java 5 and 6 JVMs #214

Merged
merged 1 commit into from Oct 25, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 4 additions & 5 deletions src/main/java/picocli/CommandLine.java
Expand Up @@ -52,7 +52,6 @@
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Queue;
import java.util.Set;
import java.util.SortedSet;
Expand Down Expand Up @@ -4562,11 +4561,11 @@ public static class ExecutionException extends PicocliException {
private final CommandLine commandLine;
public ExecutionException(CommandLine commandLine, String msg) {
super(msg);
this.commandLine = Objects.requireNonNull(commandLine, "commandLine");
this.commandLine = Assert.notNull(commandLine, "commandLine");
}
public ExecutionException(CommandLine commandLine, String msg, Exception ex) {
super(msg, ex);
this.commandLine = Objects.requireNonNull(commandLine, "commandLine");
this.commandLine = Assert.notNull(commandLine, "commandLine");
}
/** Returns the {@code CommandLine} object for the (sub)command that could not be invoked.
* @return the {@code CommandLine} object for the (sub)command where invocation failed.
Expand All @@ -4590,7 +4589,7 @@ public static class ParameterException extends PicocliException {
* @since 2.0 */
public ParameterException(CommandLine commandLine, String msg) {
super(msg);
this.commandLine = Objects.requireNonNull(commandLine, "commandLine");
this.commandLine = Assert.notNull(commandLine, "commandLine");
}
/** Constructs a new ParameterException with the specified CommandLine and error message.
* @param commandLine the command or subcommand whose input was invalid
Expand All @@ -4599,7 +4598,7 @@ public ParameterException(CommandLine commandLine, String msg) {
* @since 2.0 */
public ParameterException(CommandLine commandLine, String msg, Exception ex) {
super(msg, ex);
this.commandLine = Objects.requireNonNull(commandLine, "commandLine");
this.commandLine = Assert.notNull(commandLine, "commandLine");
}

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