You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If an enum argument is present, for example in the form '--enumMappedCmdlineOption ENUM_VALUE --anythingElse1 --anythingElse2 -- --nonOptionArg1 --nonOptionArg2', the textual form of ENUM_VALUE will be the first element after the '--' option terminator returned by AnnotatedClass#nonOptionArguments().
Workaround is using '=' character to separate the enum mapped command line option and its value:
--enumMappedCmdlineOption=ENUM_VALUE
The text was updated successfully, but these errors were encountered:
I could reproduce this by supplying a boolean argument without value declaration before the enum argument, like this: --booleanArg1 --enumMappedCmdlineOption ENUM_VALUE
The problem seems strongly related to JOSimpleBoolean annotated fields: it seems, that writing anything else after such a --booleanArg1 is treated by the parser as the value declaration for booleanArg1. As a result, in the above example, the boolean value remains false, and the String afterwars is "swallowed" by the parser, and therefore the the enum remains at its default value, discarding the value on the command line
Writing booleanArg1=true works around the problem, and the enum (and the boolean) get their correct value even if no = sign is used for the enum.
If an enum argument is present, for example in the form '--enumMappedCmdlineOption ENUM_VALUE --anythingElse1 --anythingElse2 -- --nonOptionArg1 --nonOptionArg2', the textual form of ENUM_VALUE will be the first element after the '--' option terminator returned by AnnotatedClass#nonOptionArguments().
Workaround is using '=' character to separate the enum mapped command line option and its value:
The text was updated successfully, but these errors were encountered: