Minor refactorings either for performance or readability (#4845)

Co-authored-by: Oleg Nenashev <o.v.nenashev@gmail.com>
This commit is contained in:
StefanSpiekerandOleg Nenashev authored and GitHub committed 2020-07-17 15:14:46 +01:00
1 parent 859f01f5ad
commit 463cd113ba
12 files changed
+23 -19

No files matched your search

+1 -5
View File
@@ -2196,11 +2196,7 @@ public class Functions {
public static ArrayList<CLICommand> getCLICommands() {
ArrayList<CLICommand> all = new ArrayList<>(CLICommand.all());
Collections.sort(all, new Comparator<CLICommand>() {
public int compare(CLICommand cliCommand, CLICommand cliCommand1) {
return cliCommand.getName().compareTo(cliCommand1.getName());
}
});
all.sort(Comparator.comparing(CLICommand::getName));
return all;
}