Skip to content

Commit c2a983d

Browse files
added check to make sure reader isn't at the end in findCurrentNode
1 parent 57ca551 commit c2a983d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/java/com/datasiqn/commandcore/command/builder/BuilderCommand.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ public boolean hasDescription() {
203203

204204
if (reader.atEnd() && reader.get() == ' ') args.add("");
205205
}
206+
if (node == null) throw new IllegalArgumentException("reader must not be at end");
206207
System.out.println("args is " + String.join(",", args));
207208
return new BuilderCommand.CurrentNode(Result.ok(node), nodeList, args, false);
208209
}

0 commit comments

Comments
 (0)