commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 37838] New: - wrong usage summary
Date Thu, 08 Dec 2005 12:27:15 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37838>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37838

           Summary: wrong usage summary
           Product: Commons
           Version: 1.0 Final
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: CLI
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: gepas@sinonet.de
                CC: gepas@sinonet.de


The options of a OptionGroup appears twice in the usage summary as shown by the 
following example([-c]):

usage:   [-quiet] [-debug] [-ax | -c][-c] -version [-verbose]
       [-projecthelp] [-help]
 -ax            ax or c
 -c             ax or c

Also a space is missing after the OptionGroup.

I have corrected this error by modifying the file HelpFormatter.java, line up 
247. I include the modified codes for reference:

           if( group != null /*&& !list.contains(group)*/ ) {
                             =============> changed
               if (!list.contains(group)) {
               =============> added
                   // add the group to the processed list
                   list.add( group );

                   // get the names of the options from the OptionGroup
                   Collection names = group.getNames();

                   buff.append( "[" );

                   // for each option in the OptionGroup
                   for( Iterator iter = names.iterator(); iter.hasNext(); ) {
                       buff.append( iter.next() );
                       if( iter.hasNext() ) {
                           buff.append( " | " );
                       }
                   }
                   buff.append( "] " );
                   =============> changed
               }
               // else ignore
           }

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
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