Skip to content

Option as boolean doesn't default to false #744

Closed
@jvalkeal

Description

@jvalkeal

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions