-
Notifications
You must be signed in to change notification settings - Fork 337
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
Default value should not be validated for required parameter #566
Comments
@cbeust Chime in if needed, but I personally do neither see that this is a bug nor that it could get solved. The reproducer deliberately is using @gwenn There is an implied default provided by the Java language itself, even if the application programmer does not explicitly provide a default value (try to find out whether there is no default or whether the default is |
@mkarg But for a required parameter, using a non-nullable type ( |
@gwenn I do not see why |
* Ignore default value for required parameter Fix #566
Minimal example:
If we remove the default meaningless (because parameter is required) value of
shift
(private int shift;
), JCommander throws:See
jcommander/src/main/java/com/beust/jcommander/ParameterDescription.java
Lines 152 to 159 in 748ddba
The text was updated successfully, but these errors were encountered: