commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Surette <psure...@espial.com>
Subject commons-cli: patch for org/apache/commons/cli/Option.java
Date Thu, 17 Oct 2002 16:44:21 GMT
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 );
       }

       /**

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message