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 --- .../java/org/traccar/protocol/FlexApiProtocolDecoder.java | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'src/main/java/org/traccar/protocol/FlexApiProtocolDecoder.java') diff --git a/src/main/java/org/traccar/protocol/FlexApiProtocolDecoder.java b/src/main/java/org/traccar/protocol/FlexApiProtocolDecoder.java index fb76673ca..c39f774b7 100644 --- a/src/main/java/org/traccar/protocol/FlexApiProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/FlexApiProtocolDecoder.java @@ -93,17 +93,9 @@ public class FlexApiProtocolDecoder extends BaseProtocolDecoder { Integer.parseInt(payload.getString("modem1.cell_id"), 16), payload.getInt("modem1.rssi")); switch (payload.getInt("modem1.network")) { - case 1: - cellTower.setRadioType("gsm"); - break; - case 2: - cellTower.setRadioType("wcdma"); - break; - case 3: - cellTower.setRadioType("lte"); - break; - default: - break; + case 1 -> cellTower.setRadioType("gsm"); + case 2 -> cellTower.setRadioType("wcdma"); + case 3 -> cellTower.setRadioType("lte"); } position.setNetwork(new Network(cellTower)); } -- cgit v1.2.3