aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/BstplProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/protocol/BstplProtocolDecoder.java')
-rw-r--r--src/main/java/org/traccar/protocol/BstplProtocolDecoder.java22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/main/java/org/traccar/protocol/BstplProtocolDecoder.java b/src/main/java/org/traccar/protocol/BstplProtocolDecoder.java
index 15c114642..5dee16cba 100644
--- a/src/main/java/org/traccar/protocol/BstplProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/BstplProtocolDecoder.java
@@ -61,20 +61,14 @@ public class BstplProtocolDecoder extends BaseProtocolDecoder {
.compile();
private String decodeAlarm(int value) {
- switch (value) {
- case 4:
- return Position.ALARM_LOW_BATTERY;
- case 5:
- return Position.ALARM_ACCELERATION;
- case 6:
- return Position.ALARM_BRAKING;
- case 7:
- return Position.ALARM_OVERSPEED;
- case 9:
- return Position.ALARM_SOS;
- default:
- return null;
- }
+ return switch (value) {
+ case 4 -> Position.ALARM_LOW_BATTERY;
+ case 5 -> Position.ALARM_ACCELERATION;
+ case 6 -> Position.ALARM_BRAKING;
+ case 7 -> Position.ALARM_OVERSPEED;
+ case 9 -> Position.ALARM_SOS;
+ default -> null;
+ };
}
@Override
protected Object decode(