diff options
Diffstat (limited to 'src/main/java/org/traccar/protocol/UlbotechProtocolEncoder.java')
-rw-r--r-- | src/main/java/org/traccar/protocol/UlbotechProtocolEncoder.java | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/main/java/org/traccar/protocol/UlbotechProtocolEncoder.java b/src/main/java/org/traccar/protocol/UlbotechProtocolEncoder.java index 5528c7242..10f408821 100644 --- a/src/main/java/org/traccar/protocol/UlbotechProtocolEncoder.java +++ b/src/main/java/org/traccar/protocol/UlbotechProtocolEncoder.java @@ -30,13 +30,11 @@ public class UlbotechProtocolEncoder extends BaseProtocolEncoder { @Override protected Object encodeCommand(Command command) { - switch (command.getType()) { - case Command.TYPE_CUSTOM: - return Unpooled.copiedBuffer( - "*TS01," + command.getString(Command.KEY_DATA) + "#", StandardCharsets.US_ASCII); - default: - return null; - } + return switch (command.getType()) { + case Command.TYPE_CUSTOM -> Unpooled.copiedBuffer( + "*TS01," + command.getString(Command.KEY_DATA) + "#", StandardCharsets.US_ASCII); + default -> null; + }; } } |