From d0536ccbc1b7234784c5e48288bbac00a60ef821 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 7 Jul 2024 07:33:16 -0700 Subject: Update switch statements --- src/main/java/org/traccar/protocol/T800xProtocolEncoder.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/main/java/org/traccar/protocol/T800xProtocolEncoder.java') diff --git a/src/main/java/org/traccar/protocol/T800xProtocolEncoder.java b/src/main/java/org/traccar/protocol/T800xProtocolEncoder.java index 74587c8b1..2360484ee 100644 --- a/src/main/java/org/traccar/protocol/T800xProtocolEncoder.java +++ b/src/main/java/org/traccar/protocol/T800xProtocolEncoder.java @@ -58,12 +58,10 @@ public class T800xProtocolEncoder extends BaseProtocolEncoder { header = channel.pipeline().get(T800xProtocolDecoder.class).getHeader(); } - switch (command.getType()) { - case Command.TYPE_CUSTOM: - return encodeContent(command, header, command.getString(Command.KEY_DATA)); - default: - return null; - } + return switch (command.getType()) { + case Command.TYPE_CUSTOM -> encodeContent(command, header, command.getString(Command.KEY_DATA)); + default -> null; + }; } } -- cgit v1.2.3