aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/NavigilProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/protocol/NavigilProtocolDecoder.java')
-rw-r--r--src/main/java/org/traccar/protocol/NavigilProtocolDecoder.java25
1 files changed, 9 insertions, 16 deletions
diff --git a/src/main/java/org/traccar/protocol/NavigilProtocolDecoder.java b/src/main/java/org/traccar/protocol/NavigilProtocolDecoder.java
index 6dadbc559..5d3bae8e8 100644
--- a/src/main/java/org/traccar/protocol/NavigilProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/NavigilProtocolDecoder.java
@@ -287,22 +287,15 @@ public class NavigilProtocolDecoder extends BaseProtocolDecoder {
sendAcknowledgment(channel, sequenceNumber);
}
- switch (messageId) {
- case MSG_UNIT_REPORT:
- return parseUnitReport(deviceSession, buf, sequenceNumber);
- case MSG_TG2_REPORT:
- return parseTg2Report(deviceSession, buf, sequenceNumber);
- case MSG_POSITION_REPORT:
- return parsePositionReport(deviceSession, buf, sequenceNumber, timestamp);
- case MSG_POSITION_REPORT_2:
- return parsePositionReport2(deviceSession, buf, sequenceNumber, timestamp);
- case MSG_SNAPSHOT4:
- return parseSnapshot4(deviceSession, buf, sequenceNumber);
- case MSG_TRACKING_DATA:
- return parseTrackingData(deviceSession, buf, sequenceNumber, timestamp);
- default:
- return null;
- }
+ return switch (messageId) {
+ case MSG_UNIT_REPORT -> parseUnitReport(deviceSession, buf, sequenceNumber);
+ case MSG_TG2_REPORT -> parseTg2Report(deviceSession, buf, sequenceNumber);
+ case MSG_POSITION_REPORT -> parsePositionReport(deviceSession, buf, sequenceNumber, timestamp);
+ case MSG_POSITION_REPORT_2 -> parsePositionReport2(deviceSession, buf, sequenceNumber, timestamp);
+ case MSG_SNAPSHOT4 -> parseSnapshot4(deviceSession, buf, sequenceNumber);
+ case MSG_TRACKING_DATA -> parseTrackingData(deviceSession, buf, sequenceNumber, timestamp);
+ default -> null;
+ };
}
}