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 61a465a  Delete unused assignment. (#112)
61a465a is described below

commit 61a465a96a4c67012a924ee0467760c02ad6f479
Author: Arturo Bernal <arturobern...@gmail.com>
AuthorDate: Fri Feb 3 15:23:38 2023 +0100

    Delete unused assignment. (#112)
---
 src/main/java/org/apache/commons/cli/OptionBuilder.java        | 2 +-
 src/main/java/org/apache/commons/cli/PatternOptionBuilder.java | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/commons/cli/OptionBuilder.java 
b/src/main/java/org/apache/commons/cli/OptionBuilder.java
index 8461ad2..47139bc 100644
--- a/src/main/java/org/apache/commons/cli/OptionBuilder.java
+++ b/src/main/java/org/apache/commons/cli/OptionBuilder.java
@@ -97,7 +97,7 @@ public final class OptionBuilder {
      * @throws IllegalArgumentException if {@code opt} is not a valid 
character. See Option.
      */
     public static Option create(final String opt) throws 
IllegalArgumentException {
-        Option option = null;
+        Option option;
         try {
             // create the option
             option = new Option(opt, description);
diff --git a/src/main/java/org/apache/commons/cli/PatternOptionBuilder.java 
b/src/main/java/org/apache/commons/cli/PatternOptionBuilder.java
index bc203fe..184b45e 100644
--- a/src/main/java/org/apache/commons/cli/PatternOptionBuilder.java
+++ b/src/main/java/org/apache/commons/cli/PatternOptionBuilder.java
@@ -170,7 +170,6 @@ public class PatternOptionBuilder {
                     options.addOption(option);
                     required = false;
                     type = null;
-                    opt = ' ';
                 }
 
                 opt = ch;

Reply via email to