This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-cli.git


The following commit(s) were added to refs/heads/master by this push:
     new b88dd5f  [CLI-303] Doc: "Usage Scenarios" refers to deprecated methods
b88dd5f is described below

commit b88dd5fabec6f920c0eae29a5f499350eaf14b1b
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Sat Aug 19 09:50:37 2023 -0400

    [CLI-303] Doc: "Usage Scenarios" refers to deprecated methods
---
 src/changes/changes.xml |  3 +++
 src/site/xdoc/usage.xml | 14 +++++++-------
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 9127e5d..45a7cfb 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -58,6 +58,9 @@
       <action dev="ggregory" type="fix" due-to="Gary Gregory" issue="CLI-283">
         CommandLine.addArgs(String) should not allow a null String.
       </action>
+      <action dev="ggregory" type="fix" due-to="Gary Gregory" issue="CLI-303">
+        Site docs: "Usage Scenarios" refers to deprecated methods.
+      </action>
       <!-- ADD -->
       <action type="update" dev="ggregory" due-to="Dependabot, Gary Gregory">
         Add github/codeql-action.
diff --git a/src/site/xdoc/usage.xml b/src/site/xdoc/usage.xml
index ccda3c8..ee116c7 100644
--- a/src/site/xdoc/usage.xml
+++ b/src/site/xdoc/usage.xml
@@ -180,32 +180,32 @@ Option emacs = new Option("emacs",
         <p> 
           The argument options are created using the 
<code>Option#Builder</code>.
         </p>
-        <source>Option logfile   = Option.builder("logfile")
+        <source>Option logFile = Option.builder("logfile")
                          .argName("file")
                          .hasArg()
                          .desc("use given file for log")
                          .build();
 
-Option logger    = Option.builder("logger")
+Option logger = Option.builder("logger")
                          .argName("classname")
                          .hasArg()
                          .desc("the class which it to perform logging")
                          .build();
 
-Option listener  = Option.builder("listener")
+Option listener = Option.builder("listener")
                          .argName("classname")
                          .hasArg()
                          .desc("add an instance of class as "
                                 + "a project listener")
                          .build();
 
-Option buildfile = Option.builder("buildfile")
+Option buildFile = Option.builder("buildfile")
                          .argName("file")
                          .hasArg()
                          .desc("use given buildfile")
                          .build();
 
-Option find      = Option.builde("find")
+Option find = Option.builde("find")
                          .argName("file")
                          .hasArg()
                          .desc("search for buildfile towards the "
@@ -215,7 +215,7 @@ Option find      = Option.builde("find")
       <subsection name="Defining Java Property Option">
         <p>
           The last option to create is the Java property and it is also created
-          using the OptionBuilder.
+          using the Option class' Builder.
         </p>
         <source>Option property  = Option property  = Option.builder("D")
                                 .hasArgs()
@@ -282,7 +282,7 @@ options.addOption(property);</source>
           the <code>getOptionValue</code> method.
         </p>
         <source>// has the buildfile argument been passed?
-if(line.hasOption("buildfile")) {
+if (line.hasOption("buildfile")) {
     // initialise the member variable
     this.buildfile = line.getOptionValue("buildfile");
 }</source>

Reply via email to