fvaleri commented on code in PR #20225:
URL: https://github.com/apache/kafka/pull/20225#discussion_r2224696914
##########
tools/src/main/java/org/apache/kafka/tools/consumer/group/ShareGroupCommandOptions.java:
##########
@@ -159,11 +159,11 @@ public void checkArgs() {
if (options.has(describeOpt)) {
if (!options.has(groupOpt) && !options.has(allGroupsOpt))
CommandLineUtils.printUsageAndExit(parser,
- "Option " + describeOpt + " takes one of these options: "
+
allGroupSelectionScopeOpts.stream().map(Object::toString).collect(Collectors.joining(",
")));
+ "Option " + describeOpt + " takes one of these options: "
+
allGroupSelectionScopeOpts.stream().map(Object::toString).sorted().collect(Collectors.joining(",
")));
Review Comment:
What about using `LinkedHashSet` when group of options are created and avoid
repeated sorting?
--
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]