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

ASF GitHub Bot commented on CLI-274:
------------------------------------

Github user coveralls commented on the issue:

    https://github.com/apache/commons-cli/pull/12
  
    
    [![Coverage 
Status](https://coveralls.io/builds/11939016/badge)](https://coveralls.io/builds/11939016)
    
    Coverage increased (+0.009%) to 96.244% when pulling 
**4f9c95bcb246b64f7f6756cc3840d2061a262fe7 on schaumb:patch-1** into 
**70a392756c713f404fed0e3ddd48aa18ce20485f on apache:master**.



> Option parser type EXISTING_FILE_VALUE not check file existing
> --------------------------------------------------------------
>
>                 Key: CLI-274
>                 URL: https://issues.apache.org/jira/browse/CLI-274
>             Project: Commons CLI
>          Issue Type: Bug
>          Components: Parser
>            Reporter: Béla Schaum
>            Priority: Minor
>
> When the user pass option type FileInputStream.class, I think the expected 
> behavior for the return value is the same type, which the user passed.
> Options options = new Options();
> options.addOption(Option.builder("f").hasArg().type(FileInputStream.class).build());
> CommandLine cline = new DefaultParser().parse(options, args);
> FileInputStream file = (FileInputStream) cline.getParsedOptionValue("f"); // 
> it returns "File" object, without check File exist.
> I attach a solution for it:
> https://github.com/schaumb/commons-cli/commit/abfcc8211f529ab75f3b3edd4a827e484109eb0b



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to