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

Enum values not rendered in ${COMPLETION-CANDIDATES} for collection types #494

Closed
remkop opened this issue Sep 26, 2018 · 0 comments
Closed
Milestone

Comments

@remkop
Copy link
Owner

remkop commented Sep 26, 2018

Example that reproduce the issue:

public class EnumTest {

    @Option(names = "-list", description = "Multiple days. Valid values: ${COMPLETION-CANDIDATES}")
    List<DayOfWeek> daysOfWeek;

    @Option(names = "-single", description = "Single day. Valid values: ${COMPLETION-CANDIDATES}")
    DayOfWeek dayOfWeek;

    public static void main(String[] args) {
        new CommandLine(new EnumTest()).usage(System.out);
    }
}

Actual output:

Usage: <main class> [-single=<dayOfWeek>] [-list=<daysOfWeek>]...
      -list=<daysOfWeek>    Multiple days. Valid values:
      -single=<dayOfWeek>   Single day. Valid values: MONDAY, TUESDAY, WEDNESDAY,
                              THURSDAY, FRIDAY, SATURDAY, SUNDAY

Expected output:
The -list option should also display the enum values.

@remkop remkop added this to the 3.6.1 milestone Sep 26, 2018
@remkop remkop closed this as completed in 3ddbd15 Sep 26, 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