Skip to content

Stricter arity validation #365

@remkop

Description

@remkop

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)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions