cbeust / jcommander

Command line parsing framework for Java
Apache License 2.0
1.95k stars 332 forks source link

Fixed #471 @Param(default = ) #518

Closed fsd654qyl closed 11 months ago

fsd654qyl commented 3 years ago

fixed #471 I add defaultValueDiscription in Parameter.java (default conficts to the keyword of java). When getDefault() is called, it will check if defaultValueDiscription is a empty string. If not, getDefault() will return defaultValueDiscription instead of defaultObject.

mkarg commented 11 months ago

Hope you don't mind, but I had to modify your solution a bit because the original code caused some trouble:

The final solution is found in 6e443526b1cedf55dfa05542837fb2e283d2ad93.