diff options
author | jcardus <asklocation.net@gmail.com> | 2024-03-29 20:04:18 +0000 |
---|---|---|
committer | jcardus <asklocation.net@gmail.com> | 2024-03-29 20:04:18 +0000 |
commit | 1450fc6a6cb3d56eefff7d0f222a868b3568c592 (patch) | |
tree | 8a1acc5e9731f7b16f1dfde64e94d77c353e3dbe /src | |
parent | 7ed2a8b54d9e269b0b5d180dc976d38926cd5bac (diff) | |
download | trackermap-server-1450fc6a6cb3d56eefff7d0f222a868b3568c592.tar.gz trackermap-server-1450fc6a6cb3d56eefff7d0f222a868b3568c592.tar.bz2 trackermap-server-1450fc6a6cb3d56eefff7d0f222a868b3568c592.zip |
fix trailing spaces
fix naming convention
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/traccar/protocol/Gl200TextProtocolDecoder.java | 10 |
1 files 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<String, String> devices = new HashMap<String, String>() {{ + private static final HashMap<String, String> DEVICE_MODELS = new HashMap<String, String>() {{ 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() : ""; |