Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating from 1.7.2 to 1.7.8 breaks #483

Open
SElab2019 opened this issue Jan 9, 2020 · 0 comments
Open

Updating from 1.7.2 to 1.7.8 breaks #483

SElab2019 opened this issue Jan 9, 2020 · 0 comments

Comments

@SElab2019
Copy link

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;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant