aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/MainEventHandler.java
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-05-23 09:41:27 +0500
committerAbyss777 <abyss@fox5.ru>2016-05-23 09:41:27 +0500
commit0065906b1c745eb4305469e562b9c740e694074c (patch)
tree349c0cc279600964f7809068738ea70f34bb5216 /src/org/traccar/MainEventHandler.java
parentf8808f942a094efb723c66b83eeed8a88a8e01c6 (diff)
downloadtrackermap-server-0065906b1c745eb4305469e562b9c740e694074c.tar.gz
trackermap-server-0065906b1c745eb4305469e562b9c740e694074c.tar.bz2
trackermap-server-0065906b1c745eb4305469e562b9c740e694074c.zip
Two optimizations
Diffstat (limited to 'src/org/traccar/MainEventHandler.java')
-rw-r--r--src/org/traccar/MainEventHandler.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/org/traccar/MainEventHandler.java b/src/org/traccar/MainEventHandler.java
index 5a8952abe..0f20b312b 100644
--- a/src/org/traccar/MainEventHandler.java
+++ b/src/org/traccar/MainEventHandler.java
@@ -50,8 +50,9 @@ public class MainEventHandler extends IdleStateAwareChannelHandler {
s.append("lon: ").append(String.format("%.5f", position.getLongitude())).append(", ");
s.append("speed: ").append(String.format("%.1f", position.getSpeed())).append(", ");
s.append("course: ").append(String.format("%.1f", position.getCourse()));
- if ((position.getAttributes().get(Event.KEY_RESULT) != null)) {
- s.append(", result: ").append(position.getAttributes().get(Event.KEY_RESULT));
+ Object cmdResult = position.getAttributes().get(Event.KEY_RESULT);
+ if (cmdResult != null) {
+ s.append(", result: ").append(cmdResult);
}
Log.info(s.toString());