diff options
Diffstat (limited to 'src/main/java/org/traccar/protocol/GranitProtocolSmsEncoder.java')
-rw-r--r-- | src/main/java/org/traccar/protocol/GranitProtocolSmsEncoder.java | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/main/java/org/traccar/protocol/GranitProtocolSmsEncoder.java b/src/main/java/org/traccar/protocol/GranitProtocolSmsEncoder.java index be0ab5130..6b8ef0969 100644 --- a/src/main/java/org/traccar/protocol/GranitProtocolSmsEncoder.java +++ b/src/main/java/org/traccar/protocol/GranitProtocolSmsEncoder.java @@ -28,14 +28,11 @@ public class GranitProtocolSmsEncoder extends StringProtocolEncoder { @Override protected String encodeCommand(Command command) { - switch (command.getType()) { - case Command.TYPE_REBOOT_DEVICE: - return "BB+RESET"; - case Command.TYPE_POSITION_PERIODIC: - return formatCommand(command, "BB+BBMD=%s", Command.KEY_FREQUENCY); - default: - return null; - } + return switch (command.getType()) { + case Command.TYPE_REBOOT_DEVICE -> "BB+RESET"; + case Command.TYPE_POSITION_PERIODIC -> formatCommand(command, "BB+BBMD=%s", Command.KEY_FREQUENCY); + default -> null; + }; } } |