[ 
https://issues.apache.org/jira/browse/CLI-303?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gary D. Gregory resolved CLI-303.
---------------------------------
    Fix Version/s: 1.6.0
       Resolution: Fixed

[~julian.schilling] 

Thank you for your report. This is fixed in git master.

> Doc: "Usage Scenarios" refers to deprecated methods
> ---------------------------------------------------
>
>                 Key: CLI-303
>                 URL: https://issues.apache.org/jira/browse/CLI-303
>             Project: Commons CLI
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 1.3.1
>            Reporter: Julian Schilling
>            Priority: Minor
>              Labels: documentation, easyfix
>             Fix For: 1.6.0
>
>
> The [Usage Scenarios|http://commons.apache.org/proper/commons-cli/usage.html] 
> describe how to add argument options like this:
> {code:java}
> Option logfile   = OptionBuilder.withArgName( "file" )
>                                 .hasArg()
>                                 .withDescription(  "use given file for log" )
>                                 .create( "logfile" );
> {code}
> OptionBuilder has been deprecated. From what I can tell, the new way to do it 
> is this:
> {code:java}
>   Option logfile = Option.builder("logfile")
>       .argName("file")
>       .hasArg()
>       .desc("use given file for log")
>       .build();{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to