aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/XirgoProtocolEncoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2024-07-07 07:33:16 -0700
committerAnton Tananaev <anton@traccar.org>2024-07-07 07:33:16 -0700
commitd0536ccbc1b7234784c5e48288bbac00a60ef821 (patch)
tree29ba8e1349eb9a5990f564edad7ddc7b5e24d7f7 /src/main/java/org/traccar/protocol/XirgoProtocolEncoder.java
parent864872b2df3e26c94d3a5826f4df504de3cf6c62 (diff)
downloadtrackermap-server-d0536ccbc1b7234784c5e48288bbac00a60ef821.tar.gz
trackermap-server-d0536ccbc1b7234784c5e48288bbac00a60ef821.tar.bz2
trackermap-server-d0536ccbc1b7234784c5e48288bbac00a60ef821.zip
Update switch statements
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;
+ };
}
}