diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-04-27 12:01:43 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-04-27 12:01:43 +1200 |
commit | d560f0cfdbbe9639e681bfeedd25d4de845d6161 (patch) | |
tree | 3845758ede6bafb9ee8d5fc2bda37de446ae9f34 /src/org/traccar/protocol/NavisProtocolDecoder.java | |
parent | 8e24c10cdc42fdece70d420b206bb6062edb589c (diff) | |
download | trackermap-server-d560f0cfdbbe9639e681bfeedd25d4de845d6161.tar.gz trackermap-server-d560f0cfdbbe9639e681bfeedd25d4de845d6161.tar.bz2 trackermap-server-d560f0cfdbbe9639e681bfeedd25d4de845d6161.zip |
Refactor model classes
Diffstat (limited to 'src/org/traccar/protocol/NavisProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/NavisProtocolDecoder.java | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/org/traccar/protocol/NavisProtocolDecoder.java b/src/org/traccar/protocol/NavisProtocolDecoder.java index 8a5afc17f..7ac0dccdf 100644 --- a/src/org/traccar/protocol/NavisProtocolDecoder.java +++ b/src/org/traccar/protocol/NavisProtocolDecoder.java @@ -20,7 +20,6 @@ import java.nio.charset.Charset; import java.util.Calendar; import java.util.LinkedList; import java.util.List; -import java.util.Properties; import java.util.TimeZone; import org.jboss.netty.buffer.ChannelBuffer; @@ -29,8 +28,6 @@ import org.jboss.netty.channel.Channel; import org.jboss.netty.channel.ChannelHandlerContext; import org.traccar.BaseProtocolDecoder; -import org.traccar.database.DataManager; -import org.traccar.helper.Log; import org.traccar.model.ExtendedInfoFormatter; import org.traccar.model.Position; @@ -64,8 +61,8 @@ public class NavisProtocolDecoder extends BaseProtocolDecoder { } private class ParseResult { - private long id; - private Position position; + private final long id; + private final Position position; public ParseResult(long id, Position position) { this.id = id; @@ -226,7 +223,7 @@ public class NavisProtocolDecoder extends BaseProtocolDecoder { sendReply(channel, response); // No location data - if (result.getPosition().getValid() == null) { + if (result.getPosition().getFixTime() == null) { return null; } @@ -239,7 +236,7 @@ public class NavisProtocolDecoder extends BaseProtocolDecoder { for (int i = 0; i < count; i++) { Position position = parsePosition(buf).getPosition(); - if (position.getValid() != null) { + if (position.getFixTime() != null) { positions.add(position); } } |