On 30 January 2013 17:12, Thomas Neidhart <thomas.neidh...@gmail.com> wrote: > On Wed, Jan 30, 2013 at 6:05 PM, <s...@apache.org> wrote: > >> Author: sebb >> Date: Wed Jan 30 17:05:51 2013 >> New Revision: 1440524 >> >> URL: http://svn.apache.org/viewvc?rev=1440524&view=rev >> Log: >> Document unexpected list contents >> >> Modified: >> >> commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Options.java >> >> Modified: >> commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Options.java >> URL: >> http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Options.java?rev=1440524&r1=1440523&r2=1440524&view=diff >> >> ============================================================================== >> --- >> commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Options.java >> (original) >> +++ >> commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Options.java >> Wed Jan 30 17:05:51 2013 >> @@ -55,6 +55,8 @@ public class Options implements Serializ >> private Map<String, Option> longOpts = new LinkedHashMap<String, >> Option>(); >> >> /** a map of the required options */ >> + // N.B. This can contain either a String (addOption) or an >> OptionGroup (addOptionGroup) >> + // TODO this seems wrong >> private List<Object> requiredOpts = new ArrayList<Object>(); >> > > Indeed, I also spotted this and failed to resolve it, as the logic in the > parsers is somehow taken advantage of it in a way I do not yet fully > understand.
Me neither. Maybe the code would still work if the entries were always OptionGroups. This could perhaps be done by converting the Option into a single-entry OptionGroup and storing that, rather than storing the Option key String. In theory that might work ... > Thomas --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org