commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Duncan Jones (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CLI-244) Non-existing option is not reported as a failure when it follows an option that accepts multiple values
Date Tue, 07 Apr 2015 06:24:13 GMT

    [ https://issues.apache.org/jira/browse/CLI-244?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14482671#comment-14482671
] 

Duncan Jones commented on CLI-244:
----------------------------------

Marking this as blocked by CLI-221. Until the correct behaviour is determined, this issue
cannot be examined.

> Non-existing option is not reported as a failure when it follows an option that accepts
multiple values
> -------------------------------------------------------------------------------------------------------
>
>                 Key: CLI-244
>                 URL: https://issues.apache.org/jira/browse/CLI-244
>             Project: Commons CLI
>          Issue Type: Bug
>          Components: CLI-1.x
>    Affects Versions: 1.2
>         Environment: Java 7
> Linux/Windows
>            Reporter: Ivan C
>            Priority: Critical
>
> If I define the following options:
> {code:java}
>         Option dest = OptionBuilder
>                 .withArgName("-d")
>                 .withDescription("Destination")
>                 .hasArg()
>                 .create("-d");
>         dest.setRequired(true);
>         Option filenames = OptionBuilder
>                 .withArgName("-f")
>                 .withDescription("Filenames; comma separated")
>                 .hasArgs()
>                 .withValueSeparator(',')
>                 .create("-f");
> {code}
> when I parse the following arguments
> {code}
> -d c:\development\test -f abc.txt -qa hello
> {code}
> rather than getting a ParseException, the code thinks abc.txt, -qa, hello are the values
for the -f option.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message