diff options
Diffstat (limited to 'src/org/traccar/protocol/OsmAndProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/OsmAndProtocolDecoder.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/OsmAndProtocolDecoder.java b/src/org/traccar/protocol/OsmAndProtocolDecoder.java index aa941b7fc..3a0274269 100644 --- a/src/org/traccar/protocol/OsmAndProtocolDecoder.java +++ b/src/org/traccar/protocol/OsmAndProtocolDecoder.java @@ -56,9 +56,9 @@ public class OsmAndProtocolDecoder extends BaseProtocolDecoder { Position position = new Position(); position.setProtocol(getProtocolName()); - for (String key : params.keySet()) { - String value = params.get(key).get(0); - switch (key) { + for (Map.Entry<String, List<String>> entry : params.entrySet()) { + String value = entry.getValue().get(0); + switch (entry.getKey()) { case "id": case "deviceid": if (!identify(value, channel, remoteAddress)) { @@ -101,7 +101,7 @@ public class OsmAndProtocolDecoder extends BaseProtocolDecoder { position.set(Event.KEY_BATTERY, value); break; default: - position.set(key, value); + position.set(entry.getKey(), value); break; } } |