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

Fixes #571 #573

Merged
merged 1 commit into from
Apr 27, 2024
Merged

Fixes #571 #573

merged 1 commit into from
Apr 27, 2024

Conversation

mkarg
Copy link
Collaborator

@mkarg mkarg commented Dec 13, 2023

Fixes #571

A default fulfills requirement, but does not count as assignment.

@mkarg
Copy link
Collaborator Author

mkarg commented Dec 13, 2023

@shuwada I think you solution still works even if we remove this line. Can you please check that?
@bluecontainer I think this chage should fix the bug reported by you. Can you please check that?

mkarg referenced this pull request Dec 13, 2023
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.
@mkarg mkarg added the bug Bug label Dec 27, 2023
@mkarg
Copy link
Collaborator Author

mkarg commented Feb 18, 2024

@shuwada @bluecontainer "ping" ;-)

@mkarg
Copy link
Collaborator Author

mkarg commented Apr 27, 2024

@shuwada @bluecontainer "ping" ;-)

As you did not respond, I assume you silently agree. So I am merging this PR now.

@mkarg mkarg merged commit 2d3fc62 into cbeust:master Apr 27, 2024
1 check passed
@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
bug Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to determine if a parameter was received from the command line
1 participant