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 2005/01/04 17:12:25 UTC

DO NOT REPLY [Bug 32936] New: - A single char argument equals to an option makes parser to fail.

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=32936>.
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=32936

           Summary: A single char argument equals to an option makes parser
                    to fail.
           Product: Commons
           Version: unspecified
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: CLI
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: claudio.rosati@acsys.it


I've the following code:

options.addOption(OptionBuilder.withLongOpt("label").hasArg().create("l"));
options.addOption(OptionBuilder.withLongOpt("property-descriptor").hasArgs
().create("p"));
...

if the args param of the parser is

args[0] = "--label";
args[1] = "p";
args[ ] = ...

ParseException is thrown with the following message: "no argument for:l".
If I change args[1] using any character not used as short option's form the 
programs work. Any chars used as short option's form makes the parser to fail.

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