You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Phil Surette <ps...@espial.com> on 2002/10/17 18:44:21 UTC
commons-cli: patch for org/apache/commons/cli/Option.java
Thanks everyone for getting the nightly build going
for cli. Talk about responsive!
I'm trying the package out right now, very nice
(though it requires a bit of play to figure out
how to do things).
I ran into a bug when trying to use the HelpFormatter
which excercises Option.hasArgName. Here's my patch
for it.
/org/apache/commons/cli/Option.java
***************
*** 395,401 ****
* set.
*/
public boolean hasArgName() {
! return (this.argName != null || this.argName.length() > 0 );
}
/**
--- 395,407 ----
* set.
*/
public boolean hasArgName() {
! if (argName == null) {
! return false;
! }
! else {
! return argName.length() > 0;
! }
! //return (this.argName != null || this.argName.length() > 0 );
}
/**
Re: commons-cli: patch for org/apache/commons/cli/Option.java
Posted by John Keyes <jb...@mac.com>.
Phil,
I'll get around to looking at this in a few hours time.
Thanks for the input,
-John K
On Thu, 2002-10-17 at 17:44, Phil Surette wrote:
> Thanks everyone for getting the nightly build going
> for cli. Talk about responsive!
>
> I'm trying the package out right now, very nice
> (though it requires a bit of play to figure out
> how to do things).
>
> I ran into a bug when trying to use the HelpFormatter
> which excercises Option.hasArgName. Here's my patch
> for it.
>
> /org/apache/commons/cli/Option.java
> ***************
> *** 395,401 ****
> * set.
> */
> public boolean hasArgName() {
> ! return (this.argName != null || this.argName.length() > 0 );
> }
>
> /**
> --- 395,407 ----
> * set.
> */
> public boolean hasArgName() {
> ! if (argName == null) {
> ! return false;
> ! }
> ! else {
> ! return argName.length() > 0;
> ! }
> ! //return (this.argName != null || this.argName.length() > 0 );
> }
>
> /**
--
John Keyes <jb...@mac.com>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>