commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Keyes <j...@mac.com>
Subject Re: Bug in CLI
Date Wed, 10 Sep 2003 21:54:07 GMT
Matthieu,

Thanks very much for the patch.  We hope to have a new version of
CLI out soon, so we have suspended development of the version 1
code.

-John K

On Sunday, September 7, 2003, at 10:40 PM, Matthieu Bentot wrote:

> Hi,
>
> Err, there is a bug in commons-cli, the OptionBuilder implicitely 
> initializes
> argNames with null, so the first option created, if it takes 
> arguments, will have
> them with no names, hence not listed by the HelpFormatter.
>
> The "patch" follows (if at all needed ;-):
>
> diff -c -r1.15 OptionBuilder.java
> *** cli/src/java/org/apache/commons/cli/OptionBuilder.java      9 Dec 
> 2002 23:47:24 -0000       1.15
> --- cli/src/java/org/apache/commons/cli/OptionBuilder.java      7 Sep 
> 2003 22:21:15 -0000
> ***************
> *** 79,85 ****
>       private static String description;
>
>       /** argument name */
> !     private static String argName;
>
>       /** is required? */
>       private static boolean required;
> --- 79,85 ----
>       private static String description;
>
>       /** argument name */
> !     private static String argName = "arg";
>
>       /** is required? */
>       private static boolean required;
>
> Great stuff, BTW. Being able to write a complete CLI parser in 10 
> lines, plus the free help print, gotta love that.
>
> Cheers,
>
> Matthieu
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>


Mime
View raw message