Skip to content

Commit

Permalink
Raise InvalidArgumentException on null values
Browse files Browse the repository at this point in the history
  • Loading branch information
bertfrees committed Sep 26, 2024
1 parent 6dc5c0d commit 262183f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/SimpleAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ public CommandLineJobParser(Script script, File fileBase) {
*/
public CommandLineJobParser withArgument(String key, String value)
throws IllegalArgumentException, FileNotFoundException, URISyntaxException {
if (value == null)
throw new IllegalArgumentException();
if (script.getInputPort(key) != null)
return withInput(key, value);
else if (script.getOption(key) != null)
Expand Down

0 comments on commit 262183f

Please sign in to comment.