You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Emmanuel Bourg (JIRA)" <ji...@apache.org> on 2008/07/25 10:55:31 UTC
[jira] Updated: (CLI-53) Parsing error?
[ https://issues.apache.org/jira/browse/CLI-53?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Emmanuel Bourg updated CLI-53:
------------------------------
Component/s: (was: CLI-2.x)
Parser
Environment: (was: Operating System: Linux
Platform: PC)
Summary: Parsing error? (was: [cli] Parsing error?)
> Parsing error?
> --------------
>
> Key: CLI-53
> URL: https://issues.apache.org/jira/browse/CLI-53
> Project: Commons CLI
> Issue Type: Bug
> Components: Parser
> Affects Versions: 1.0
> Reporter: C Rose
> Fix For: 2.1
>
>
> Hi
> If one accidentally confuses the long and short argument name styles, then the value of the argument is
> incorrect. This is mad clear by an example:
> If I have a program that I call as follows:
> my_prog --file my_file.txt
> or
> my_prog -f my_file.txt
> but I make a typo and write
> my_prog -file my_file.txt
> then getOptionValue('f') will return "ile" (i.e. it thinks the remainder of the argument's name is the
> argument). "my_file.txt" will be ignored.
> This is clearly an error that the user has made, but I think that CLI should be able to detect such an
> error and throw an appropriate exception.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.