Skip to content

Commit 9267c49

Browse files
committed
hotfix v1.1 - null args in help command
1 parent dc8c283 commit 9267c49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lab5/src/commandManagers/commands/Help.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ public void execute() {
3737
manager.getCommandMap().forEach((name, command) -> System.out.println(name + " : " + command.getDescr()));
3838
else {
3939
var command = manager.getCommandMap().get(this.getArgument());
40-
this.setArgument(null);
4140
System.out.println(this.getArgument() + " : " + Optional.ofNullable(command).map(Command::getDescr).orElse("This command is not found in manager"));
41+
this.setArgument(null);
4242
}
4343
}
4444

0 commit comments

Comments
 (0)