From d0536ccbc1b7234784c5e48288bbac00a60ef821 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 7 Jul 2024 07:33:16 -0700 Subject: Update switch statements --- src/main/java/org/traccar/protocol/PluginProtocolDecoder.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src/main/java/org/traccar/protocol/PluginProtocolDecoder.java') diff --git a/src/main/java/org/traccar/protocol/PluginProtocolDecoder.java b/src/main/java/org/traccar/protocol/PluginProtocolDecoder.java index 6ee95d18a..aca5d3eb6 100644 --- a/src/main/java/org/traccar/protocol/PluginProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/PluginProtocolDecoder.java @@ -125,15 +125,8 @@ public class PluginProtocolDecoder extends BaseProtocolDecoder { if (parser.hasNext()) { int event = parser.nextInt(); switch (event) { - case 11317: - position.set(Position.KEY_ALARM, Position.ALARM_ACCELERATION); - break; - case 11319: - position.set(Position.KEY_ALARM, Position.ALARM_BRAKING); - break; - default: - break; - + case 11317 -> position.set(Position.KEY_ALARM, Position.ALARM_ACCELERATION); + case 11319 -> position.set(Position.KEY_ALARM, Position.ALARM_BRAKING); } position.set(Position.KEY_EVENT, event); } -- cgit v1.2.3