commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <joerg.schai...@gmx.de>
Subject Re: svn commit: r1440524 - /commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Options.java
Date Wed, 30 Jan 2013 18:18:52 GMT
Hi,

sebb wrote:

[snip]

>>>      /** 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 ...

Or create a package local marker interface OptionEntry and let both classes 
implement it.

- Jörg



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message