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

Mkarg/unable to determine if a 571 #1

Closed
wants to merge 43 commits into from

Conversation

mkarg
Copy link
Owner

@mkarg mkarg commented Dec 20, 2023

This is a test.

mkarg and others added 30 commits August 23, 2023 16:20
* Ignore default value for required parameter

Fix cbeust#566
Co-authored-by: Markus KARG <[email protected]>
Fixes cbeust#471 by implementing optional `defaultValueDescription` parameter which overrides the automatic description.
…must not produce different result as existing code relies on current behavior
Before this commit, if you supply a command to a JCommander object
and you dont supply a description for the command, then when calling
usage() you will see a line of the following format:
"<command-name> null"

After this commit the string literal "null" will be omitted from the
usage() call if you do not supply a description for the command.

Fixes cbeust#480
garydgregory and others added 13 commits October 7, 2023 15:20
Example for @parameter on setter method
If a default value is assigned to a required parameter on its
initialization, JCommander won't throw ParameterException even if no
value is given by user.

Due to this fix JCommanderTest#requiredFields1Fail did not fail anymore
since Args1#verbose was a required parameter with a default value. To
distinguish the two cases when a required parameter has no default value
and has a default value, this commit removes the default value from
Args1#verbose.
* Allow acceptUnknownOption with variableArity

VariableArity makes it difficult to decide whether a
token belongs to a preceding variableArity Parameter
or is a new unknown parameter.

This commits makes a variableArity Parameter consume
all tokens until it encounters a known option.

Fixes: cbeust#377

* Change test to use '=' separator only for new case
Copy link
Owner Author

@mkarg mkarg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a comment.

@mkarg mkarg closed this Dec 20, 2023
@mkarg mkarg deleted the mkarg/unable-to-determine-if-a-571 branch April 27, 2024 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants