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 cb334bd  CLI-326: make option.getKey() public (#239)
cb334bd is described below

commit cb334bdf9d9408669996ab01a710b444f0d0c8c6
Author: Claude Warren <claude.war...@aiven.io>
AuthorDate: Thu Feb 29 14:27:44 2024 +0100

    CLI-326: make option.getKey() public (#239)
    
    * Made option.getKey public
    
    * added 'since' and javadoc
    
    * Removed extraneous space.
---
 src/main/java/org/apache/commons/cli/Option.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/commons/cli/Option.java 
b/src/main/java/org/apache/commons/cli/Option.java
index 0e7a36b..8f4bfde 100644
--- a/src/main/java/org/apache/commons/cli/Option.java
+++ b/src/main/java/org/apache/commons/cli/Option.java
@@ -573,11 +573,13 @@ public class Option implements Cloneable, Serializable {
     }
 
     /**
-     * Gets the 'unique' Option identifier.
+     * Gets the 'unique' Option identifier.  This is the option value if set 
or the long value
+     * if the options value is not set.
      *
      * @return the 'unique' Option identifier
+     * @since 1.7.0
      */
-    String getKey() {
+    public String getKey() {
         // if 'opt' is null, then it is a 'long' option
         return option == null ? longOption : option;
     }

Reply via email to