garydgregory commented on code in PR #277:
URL: https://github.com/apache/commons-cli/pull/277#discussion_r1605797762
##########
src/main/java/org/apache/commons/cli/HelpFormatter.java:
##########
@@ -129,6 +129,14 @@ public Builder setShowDeprecated(final boolean
useDefaultFormat) {
}
}
+ /**
+ * Returns the option description or an empty string if the description is
{@code null}.
+ * @param option The option to get the description from.
+ * @return the option description or an empty string if the description is
{@code null}.
+ */
+ public static String getDescription(final Option option) {
+ return option.getDescription() == null ? "" : option.getDescription();
Review Comment:
> Member
If you want to refactor this, I would only do so with _package private_ code.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]