We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2626a3a commit 687464eCopy full SHA for 687464e
spring-boot-cli/src/main/java/org/springframework/boot/cli/command/options/OptionHandler.java
@@ -130,8 +130,8 @@ private static class OptionHelpFormatter implements HelpFormatter {
130
131
@Override
132
public String format(Map<String, ? extends OptionDescriptor> options) {
133
- Comparator<OptionDescriptor> comparator = (first, second) -> first.options()
134
- .iterator().next().compareTo(second.options().iterator().next());
+ Comparator<OptionDescriptor> comparator = Comparator.comparing(
+ (optionDescriptor) -> optionDescriptor.options().iterator().next());
135
Set<OptionDescriptor> sorted = new TreeSet<>(comparator);
136
sorted.addAll(options.values());
137
for (OptionDescriptor descriptor : sorted) {
0 commit comments