Use Java 17

This commit is contained in:
AsamK 2021-10-24 21:06:13 +02:00
parent 9cb1409918
commit ce70a623c2
51 changed files with 142 additions and 236 deletions

View file

@ -58,8 +58,7 @@ public class ReceiveCommand implements ExtendedDbusCommand, LocalCommand {
final Namespace ns, final Signal signal, DBusConnection dbusconnection, final OutputWriter outputWriter
) throws CommandException {
try {
if (outputWriter instanceof JsonWriter) {
final var jsonWriter = (JsonWriter) outputWriter;
if (outputWriter instanceof JsonWriter jsonWriter) {
dbusconnection.addSigHandler(Signal.MessageReceived.class, signal, messageReceived -> {
var envelope = new JsonMessageEnvelope(messageReceived);