Skip to content

Commit 20b4873

Browse files
committed
DefaultParseService: be defensive about null args
It is not allowed to attempt to parse a null value. However, previously, the exception would come from deep inside SJEP. Let's fail fast instead.
1 parent 103b326 commit 20b4873

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/java/org/scijava/parse/DefaultParseService.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ public Items parse(final String arg) {
6060

6161
@Override
6262
public Items parse(final String arg, final boolean strict) {
63+
if (arg == null) throw new NullPointerException("arg must not be null");
6364
return new ItemsList(arg, strict);
6465
}
6566

0 commit comments

Comments
 (0)