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

Stricter arity validation #365

Closed
remkop opened this issue Apr 18, 2018 · 0 comments
Closed

Stricter arity validation #365

remkop opened this issue Apr 18, 2018 · 0 comments
Milestone

Comments

@remkop
Copy link
Owner

remkop commented Apr 18, 2018

Given a command like this:

class App {
  @Option(names = "-a", arity = "2")
  String[] a;
}

The following input should be rejected (not enough parameters were supplied):

<command> -a 1 -a 2

Instead, picocli accepts this and assigns "1" and "-a" as the two values. (2 is unmatched)

@remkop remkop added this to the 3.0 milestone Apr 18, 2018
@remkop remkop changed the title Stricter validation Stricter arity validation Apr 19, 2018
@remkop remkop closed this as completed in 772a0e3 Apr 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant