aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/XirgoProtocolEncoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/protocol/XirgoProtocolEncoder.java')
-rw-r--r--src/main/java/org/traccar/protocol/XirgoProtocolEncoder.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/main/java/org/traccar/protocol/XirgoProtocolEncoder.java b/src/main/java/org/traccar/protocol/XirgoProtocolEncoder.java
index aa85e9e0e..76ec03d7a 100644
--- a/src/main/java/org/traccar/protocol/XirgoProtocolEncoder.java
+++ b/src/main/java/org/traccar/protocol/XirgoProtocolEncoder.java
@@ -28,12 +28,11 @@ public class XirgoProtocolEncoder extends StringProtocolEncoder {
@Override
protected Object encodeCommand(Command command) {
- switch (command.getType()) {
- case Command.TYPE_OUTPUT_CONTROL:
- return String.format("+XT:7005,%d,1", command.getInteger(Command.KEY_DATA) + 1);
- default:
- return null;
- }
+ return switch (command.getType()) {
+ case Command.TYPE_OUTPUT_CONTROL ->
+ String.format("+XT:7005,%d,1", command.getInteger(Command.KEY_DATA) + 1);
+ default -> null;
+ };
}
}