]> nmode's Git Repositories - signal-cli/blobdiff - src/main/java/org/asamk/signal/commands/Commands.java
Use new threads API
[signal-cli] / src / main / java / org / asamk / signal / commands / Commands.java
index 719ba132ac681f4857b6fb87c09e7bcf658fdcbd..0f26c9945828a586a69c10a270d51bac909a90dd 100644 (file)
@@ -72,8 +72,8 @@ public class Commands {
 
     private static void addCommand(Command command) {
         commands.put(command.getName(), command);
 
     private static void addCommand(Command command) {
         commands.put(command.getName(), command);
-        if (command instanceof CliCommand) {
-            commandSubparserAttacher.put(command.getName(), ((CliCommand) command)::attachToSubparser);
+        if (command instanceof CliCommand cliCommand) {
+            commandSubparserAttacher.put(command.getName(), cliCommand::attachToSubparser);
         }
     }
 }
         }
     }
 }