From 1450fc6a6cb3d56eefff7d0f222a868b3568c592 Mon Sep 17 00:00:00 2001 From: jcardus Date: Fri, 29 Mar 2024 20:04:18 +0000 Subject: fix trailing spaces fix naming convention --- .../java/org/traccar/protocol/Gl200TextProtocolDecoder.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java b/src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java index 16098bc05..9b7737b36 100644 --- a/src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java @@ -52,7 +52,7 @@ public class Gl200TextProtocolDecoder extends BaseProtocolDecoder { private final DateFormat dateFormat; - private static final HashMap devices = new HashMap() {{ + private static final HashMap DEVICE_MODELS = new HashMap() {{ put("02", "GL200"); put("04", "GV200"); put("06", "GV300"); @@ -97,11 +97,11 @@ public class Gl200TextProtocolDecoder extends BaseProtocolDecoder { } private String getDeviceModel(DeviceSession deviceSession, String value, String protocolVersion) { - if (devices.containsKey(protocolVersion.substring(0, 2))) { - return devices.get(protocolVersion.substring(0, 2)); + if (DEVICE_MODELS.containsKey(protocolVersion.substring(0, 2))) { + return DEVICE_MODELS.get(protocolVersion.substring(0, 2)); } - if (devices.containsKey(protocolVersion.substring(0, 6))) { - return devices.get(protocolVersion.substring(0, 6)); + if (DEVICE_MODELS.containsKey(protocolVersion.substring(0, 6))) { + return DEVICE_MODELS.get(protocolVersion.substring(0, 6)); } String model = value.isEmpty() ? getDeviceModel(deviceSession) : value; return model != null ? model.toUpperCase() : ""; -- cgit v1.2.3