aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/NdtpV6ProtocolEncoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/protocol/NdtpV6ProtocolEncoder.java')
-rw-r--r--src/main/java/org/traccar/protocol/NdtpV6ProtocolEncoder.java16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/main/java/org/traccar/protocol/NdtpV6ProtocolEncoder.java b/src/main/java/org/traccar/protocol/NdtpV6ProtocolEncoder.java
index 7aac8658a..eac6de133 100644
--- a/src/main/java/org/traccar/protocol/NdtpV6ProtocolEncoder.java
+++ b/src/main/java/org/traccar/protocol/NdtpV6ProtocolEncoder.java
@@ -27,16 +27,12 @@ public class NdtpV6ProtocolEncoder extends BaseProtocolEncoder {
@Override
protected Object encodeCommand(Command command) {
- switch (command.getType()) {
- case Command.TYPE_IDENTIFICATION:
- return "BB+IDNT";
- case Command.TYPE_REBOOT_DEVICE:
- return "BB+RESET";
- case Command.TYPE_POSITION_SINGLE:
- return "BB+RRCD";
- default:
- return null;
- }
+ return switch (command.getType()) {
+ case Command.TYPE_IDENTIFICATION -> "BB+IDNT";
+ case Command.TYPE_REBOOT_DEVICE -> "BB+RESET";
+ case Command.TYPE_POSITION_SINGLE -> "BB+RRCD";
+ default -> null;
+ };
}
}