aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/GeocoderHandler.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-07-08 14:33:25 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2017-07-08 14:33:25 +1200
commit731020440991a53034dd2e980add2a08cb9a19de (patch)
tree2fdc5564eea69f3b3bdffb17439519daf505b348 /src/org/traccar/GeocoderHandler.java
parentdc5dc6b6ff9b33db50d7a706017b4a0e8f423398 (diff)
downloadtrackermap-server-731020440991a53034dd2e980add2a08cb9a19de.tar.gz
trackermap-server-731020440991a53034dd2e980add2a08cb9a19de.tar.bz2
trackermap-server-731020440991a53034dd2e980add2a08cb9a19de.zip
Fix code check issues
Diffstat (limited to 'src/org/traccar/GeocoderHandler.java')
-rw-r--r--src/org/traccar/GeocoderHandler.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/org/traccar/GeocoderHandler.java b/src/org/traccar/GeocoderHandler.java
index 2742ff1a7..a211d1a23 100644
--- a/src/org/traccar/GeocoderHandler.java
+++ b/src/org/traccar/GeocoderHandler.java
@@ -60,12 +60,11 @@ public class GeocoderHandler implements ChannelUpstreamHandler {
if (processInvalidPositions || position.getValid()) {
if (geocoderReuseDistance != 0) {
Position lastPosition = Context.getIdentityManager().getLastPosition(position.getDeviceId());
- if (lastPosition != null && lastPosition.getAddress() != null) {
- if (position.getDouble(Position.KEY_DISTANCE) <= geocoderReuseDistance) {
- position.setAddress(lastPosition.getAddress());
- Channels.fireMessageReceived(ctx, position, event.getRemoteAddress());
- return;
- }
+ if (lastPosition != null && lastPosition.getAddress() != null
+ && position.getDouble(Position.KEY_DISTANCE) <= geocoderReuseDistance) {
+ position.setAddress(lastPosition.getAddress());
+ Channels.fireMessageReceived(ctx, position, event.getRemoteAddress());
+ return;
}
}