We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
@{DEFAULT-VALUE} is replaced with the array toString() which does not show the values.
@{DEFAULT-VALUE}
toString()
The workaround is to use a List instead of an array.
List
The text was updated successfully, but these errors were encountered:
Failing test
@Test public void testCommandShowDefaultValuesVariableForArrayField() { @Command(showDefaultValues = true) class Params { @Option(names = {"-x", "--array"}, required = true, description = "null array: Default: ${DEFAULT-VALUE}") int[] nil; @Option(names = {"-y", "--other"}, required = true, description = "non-null: Default: ${DEFAULT-VALUE}") int[] other = {1, 5, 11, 23}; } String result = usageString(new Params(), Help.Ansi.OFF); assertEquals(format("" + "Usage: <main class> -x=<nil> [-x=<nil>]... -y=<other> [-y=<other>]...%n" + " -x, --array=<nil> null array: Default: null%n" + " -y, --other=<other> non-null: Default: [1, 5, 11, 23]%n"), result); }
Sorry, something went wrong.
[#419] Bugfix: Default value for arrays was not rendered correctly wi…
aec31c7
…th `@{DEFAULT-VALUE}`.
No branches or pull requests
@{DEFAULT-VALUE}
is replaced with the arraytoString()
which does not show the values.The workaround is to use a
List
instead of an array.The text was updated successfully, but these errors were encountered: