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

Option as boolean doesn't default to false #744

Closed
jvalkeal opened this issue May 20, 2023 · 0 comments
Closed

Option as boolean doesn't default to false #744

jvalkeal opened this issue May 20, 2023 · 0 comments
Labels
type/bug Is a bug report
Milestone

Comments

@jvalkeal
Copy link
Contributor

jvalkeal commented May 20, 2023

Having target method argument as boolean arg fails with both annotation and legacy annotation if @Option or @ShellOption is not used. This is an issue only on 3.0.x when things were changes with a new parser.

2002E:(pos 0): Illegal option value '', reason 'Failed to convert from type [java.lang.String] to type [boolean] for value [null]'
2000E:(pos 0): Missing mandatory option, longnames='arg', shortnames=''

This is simply because CommandRegistration for option don't define default value.

@jvalkeal jvalkeal added this to the 3.1.0 milestone May 20, 2023
@jvalkeal jvalkeal added the type/bug Is a bug report label May 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Is a bug report
Projects
None yet
Development

No branches or pull requests

1 participant