public class DescriptionIssue {
static class Command {
@Parameter(names = "-t")
private String test;
}
public static void main(String[] args) {
JCommander jCommander = JCommander.newBuilder().addCommand("testCommand", new Command()).build();
jCommander.usage();
}
}
The jCommander.usage() call above will result in the String literal "null" being printed instead of any description. Below I have copied the result of running that main method:
Steps to reproduce:
The
jCommander.usage()
call above will result in the String literal "null" being printed instead of any description. Below I have copied the result of running that main method:Instead of printing "null" it should either print nothing as the description or raise an error that the command doesn't have a description