Commons CLI Changelog
New in version 1.2December 18th, 2012
- NEW FEATURES:
- The method getOptionProperties() in the CommandLine class was added to retrieve easily the key/value pairs specified with options like -Dkey1=value1 -Dkey2=value2.
- GnuParser now supports long options with an '=' sign (ie. --foo=bar and -foo=bar) (CLI-157)
- The ordering of options can be defined in help messages. (CLI-155)
- BUG FIXES:
- The number of arguments defined for an option specifies the arguments per occurrence of the option and not for all occurrences. (CLI-137)
- PosixParser no longer ignores unrecognized short options. (CLI-164)
- PosixParser no longer stops the bursting process of a token if stopAtNonOption is enabled and a non option character is encountered. (CLI-163)
- PosixParser no longer keeps processing the tokens after an unrecognized long option when stopAtNonOption is enabled. (CLI-165)
- Required options are properly checked if an Options instance is used twice to parse a command line. (CLI-156)
- The line wrapping in HelpFormatter now works properly. (CLI-151)
- The message of MissingOptionException has been improved. (CLI-149)
- The exceptions have been enhanced with methods to retrieve easily the related options. (CLI-86)
- Option.toString() now reports arguments properly. (CLI-141)
- The Parser class has been changed to be more easily extendable. (CLI-142)
- The following classes are now serializable: Option, OptionGroup, CommandLine and Options. (CLI-140)
- OptionValidator is no longer public, its methods were all private.
New in version 1.1 (October 22nd, 2008)
- The Parser abstract class has two additional parse methods that take a Properties parameter.
- The HelpFormatter class had publicly accessible fields. These should now be accessed via get/set methods and the public fields are deprecated.
- The Option class addValue(String) method now throws UnsupportedOperationException.
- OptionValidator is a newly added class.
- Option's now have equals(Object) and hashCode() methods.
- The Option class also received two new methods, setDescription(String) and hasValueSeparator();boolean.