forked from argparse4j/argparse4j
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNEWS
39 lines (31 loc) · 1.49 KB
/
NEWS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
argparse4j 0.6.0
================
Release Note
------------
This release fixes the bug that nargs("*") or nargs("+") for
positional argument consume all arguments, and do not left any
arguments to the remaining required positional arguments which take at
least 1 argument. By the product of this fix, we also fixed the bug
that positional arguments are effectively separated and stop to
consume by the existence of a flag. For example, we define positional
argument "foo" which has nargs("+"), and optional argument, "-b" which
takes not argument. Then previously, giving "a -b c d" to the program
resulted error, because "d" was not consumed by "foo". Now "d" is
identified as one of argument to "foo", and "foo" takes "a" and "d"
correctly. This could possibly change the behaviour of the
application, depending on how arguments are supplied. This release
also adds EnumStringArgumentType, and its shortcut
Arguments.enumStringType. Argument.type() already supports enum
types, but it does not take into account toString() override for enum.
EnumStringArgumentType converts strings to enums using toString as the
enum String representation.
Changes
-------
* Adds EnumStringArgumentType
Adds EnumStringArgumentType that converts strings to enums using
toString as the enum String representation.
Patch from andrewj
* Fix bug that positional arguments are separated and not consumed if
flag exists in between.
* Distribute arguments to positional Argument object to satisfy
minimum number of arguments.