|
|
|
@ -130,8 +130,8 @@ public class OptionHandler {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public String format(Map<String, ? extends OptionDescriptor> options) {
|
|
|
|
|
Comparator<OptionDescriptor> comparator = (first, second) -> first.options()
|
|
|
|
|
.iterator().next().compareTo(second.options().iterator().next());
|
|
|
|
|
Comparator<OptionDescriptor> comparator = Comparator.comparing(
|
|
|
|
|
(optionDescriptor) -> optionDescriptor.options().iterator().next());
|
|
|
|
|
Set<OptionDescriptor> sorted = new TreeSet<>(comparator);
|
|
|
|
|
sorted.addAll(options.values());
|
|
|
|
|
for (OptionDescriptor descriptor : sorted) {
|
|
|
|
|