diff options
Diffstat (limited to 'src/main/java/org/traccar/protocol/TopinProtocolEncoder.java')
-rw-r--r-- | src/main/java/org/traccar/protocol/TopinProtocolEncoder.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/org/traccar/protocol/TopinProtocolEncoder.java b/src/main/java/org/traccar/protocol/TopinProtocolEncoder.java index 77f80b9d4..b3b6bc23f 100644 --- a/src/main/java/org/traccar/protocol/TopinProtocolEncoder.java +++ b/src/main/java/org/traccar/protocol/TopinProtocolEncoder.java @@ -54,13 +54,13 @@ public class TopinProtocolEncoder extends BaseProtocolEncoder { ByteBuf content = Unpooled.buffer(); - switch (command.getType()) { - case Command.TYPE_SOS_NUMBER: + return switch (command.getType()) { + case Command.TYPE_SOS_NUMBER -> { content.writeCharSequence(command.getString(Command.KEY_PHONE), StandardCharsets.US_ASCII); - return encodeContent(TopinProtocolDecoder.MSG_SOS_NUMBER, content); - default: - return null; - } + yield encodeContent(TopinProtocolDecoder.MSG_SOS_NUMBER, content); + } + default -> null; + }; } } |