b9893ab2c4547b75942f73f96d20b37d1e245689 |
|
29-May-2011 |
rodionmoiseev <rodion.moiseev@gmail.com> |
Fixed issue #64 (wrong default value behaviour in for list parameters), and added support for Set parameters. Fix for #64: * ParameterDescription#m_assigned flag was being set too early, meaning it could become true even in case of an exception. To fix, moved it to the end of the try block. * Now we can use m_assigned, to test if the fields is being set for the first time, and use it to clear default values for collection parameters. Added support for Set type parameters, and provided a clearer exception for unsupported Collection type parameters (before the fix, a ClassCastException would be thrown). Additional support for Stack and Queue types could be added but would require a little more testing. Not sure of how useful Queues and Stacks would be anyway.
/external/jcommander/src/main/java/com/beust/jcommander/internal/Sets.java
|