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 31148] New: - Passing properties in Parser does not work for options with a single argument
Date Thu, 09 Sep 2004 18:55:47 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=31148>.
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=31148

Passing properties in Parser does not work for options with a single argument

           Summary: Passing properties in Parser does not work for options
                    with a single argument
           Product: Commons
           Version: Nightly Builds
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: CLI
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: gawor@mcs.anl.gov


processProperties(Properties properties) in Parser.java calls opt.hasArgs().  
The hasArgs() function in Option.java returns true if the option has multiple 
values (this.numberOfArgs > 1). So for options with a single argument this 
returns false. 
A simple fix is to change the opt.hasArgs() call to opt.hasArg() in Parser.java.

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