Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/main/java/org/apache/commons/cli/Option.java
Original file line number Diff line number Diff line change
Expand Up @@ -573,11 +573,13 @@ public int getId() {
}

/**
* 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() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @Claudenw
If you make an element public or protected, you need a @since Javadoc tag.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It also needs more Javadoc to explain what the key means

// if 'opt' is null, then it is a 'long' option
return option == null ? longOption : option;
}
Expand Down