Skip to content

Commit cb334bd

Browse files
authored
CLI-326: make option.getKey() public (#239)
* Made option.getKey public * added 'since' and javadoc * Removed extraneous space.
1 parent 111def8 commit cb334bd

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/main/java/org/apache/commons/cli/Option.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,11 +573,13 @@ public int getId() {
573573
}
574574

575575
/**
576-
* Gets the 'unique' Option identifier.
576+
* Gets the 'unique' Option identifier. This is the option value if set or the long value
577+
* if the options value is not set.
577578
*
578579
* @return the 'unique' Option identifier
580+
* @since 1.7.0
579581
*/
580-
String getKey() {
582+
public String getKey() {
581583
// if 'opt' is null, then it is a 'long' option
582584
return option == null ? longOption : option;
583585
}

0 commit comments

Comments
 (0)