garydgregory commented on code in PR #271:
URL: https://github.com/apache/commons-cli/pull/271#discussion_r1597465949
##########
src/main/java/org/apache/commons/cli/HelpFormatter.java:
##########
@@ -103,14 +109,23 @@ public Builder setPrintWriter(final PrintWriter
printWriter) {
/**
* Sets whether to show deprecated options.
*
- * @param showDeprecated Whether to show deprecated options.
+ * @param useDefaultFormat if {@code true} use the default format,
otherwise clear the formatter.
* @return this.
*/
- public Builder setShowDeprecated(final boolean showDeprecated) {
- this.showDeprecated = showDeprecated;
- return this;
+ public Builder setShowDeprecated(final boolean useDefaultFormat) {
+ return setShowDeprecated(useDefaultFormat ?
DEFAULT_DEPRECATED_FORMAT : null);
}
+ /**
+ * Sets whether to show deprecated options.
+ *
+ * @param showDeprecatedFunc Specify the format for the deprecated
options.
+ * @return this.
+ */
+ public Builder setShowDeprecated(final BiFunction<String, Option,
String> showDeprecatedFunc) {
Review Comment:
A new public or protected API needs a `@since` tag, which for to semantic
versioning would be `1.8.0`.
--
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]