From 2005fd55347816cf4a86b66ae97bc245f53f0bcd Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 6 Jul 2024 19:47:06 -0700 Subject: Update switch statements --- .../org/traccar/protocol/FleetGuideProtocolDecoder.java | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'src/main/java/org/traccar/protocol/FleetGuideProtocolDecoder.java') diff --git a/src/main/java/org/traccar/protocol/FleetGuideProtocolDecoder.java b/src/main/java/org/traccar/protocol/FleetGuideProtocolDecoder.java index 8f679525b..6163a24c8 100644 --- a/src/main/java/org/traccar/protocol/FleetGuideProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/FleetGuideProtocolDecoder.java @@ -205,17 +205,9 @@ public class FleetGuideProtocolDecoder extends BaseProtocolDecoder { case 18: int sensorIndex = data.readUnsignedByte(); switch (recordLength - 1) { - case 1: - position.set("sensor" + sensorIndex, data.readUnsignedByte()); - break; - case 2: - position.set("sensor" + sensorIndex, data.readUnsignedShortLE()); - break; - case 4: - position.set("sensor" + sensorIndex, data.readUnsignedIntLE()); - break; - default: - break; + case 1 -> position.set("sensor" + sensorIndex, data.readUnsignedByte()); + case 2 -> position.set("sensor" + sensorIndex, data.readUnsignedShortLE()); + case 4 -> position.set("sensor" + sensorIndex, data.readUnsignedIntLE()); } break; default: -- cgit v1.2.3