When I try to upgrade jcommander from 1.7.2 to 1.7.8. The following code breaks.
public class Main {
static
public void main(String... args) throws Exception {
Main main = new Main();
JCommander commander = new JCommander(main);
commander.setProgramName(Main.class.getName());
try {
commander.parse(args);
} catch(ParameterException pe){
StringBuilder sb = new StringBuilder();
sb.append(pe.toString());
sb.append("\n");
commander.usage(sb);
System.err.println(sb.toString());
System.exit(-1);
}
}
}
The code should pass, but it throws an error:
Main.java:[36,34] method usage in class com.beust.jcommander.JCommander cannot be applied to given types;
When I try to upgrade jcommander from 1.7.2 to 1.7.8. The following code breaks.
The code should pass, but it throws an error: