You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2004/09/09 20:55:47 UTC
DO NOT REPLY [Bug 31148] New: -
Passing properties in Parser does not work for options with a single argument
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