aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar/ProtocolTest.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-01-22 19:53:48 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2018-01-22 19:53:48 +1300
commit48a5bd364b496de70a1a3eff8dd5c57c5d8fec9d (patch)
tree35a9c364f5659300b535834ccaaed737ed197a61 /test/org/traccar/ProtocolTest.java
parent58ade656e2070387f95984f5851cbc41990467ba (diff)
downloadtrackermap-server-48a5bd364b496de70a1a3eff8dd5c57c5d8fec9d.tar.gz
trackermap-server-48a5bd364b496de70a1a3eff8dd5c57c5d8fec9d.tar.bz2
trackermap-server-48a5bd364b496de70a1a3eff8dd5c57c5d8fec9d.zip
Optimize date assignment
Diffstat (limited to 'test/org/traccar/ProtocolTest.java')
-rw-r--r--test/org/traccar/ProtocolTest.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/test/org/traccar/ProtocolTest.java b/test/org/traccar/ProtocolTest.java
index 1daefabd6..5cbb651bf 100644
--- a/test/org/traccar/ProtocolTest.java
+++ b/test/org/traccar/ProtocolTest.java
@@ -27,11 +27,9 @@ public class ProtocolTest extends BaseTest {
Position position = new Position();
- if (time != null) {
- DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
- dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
- position.setTime(dateFormat.parse(time));
- }
+ DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
+ dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
+ position.setTime(dateFormat.parse(time));
position.setValid(valid);
position.setLatitude(lat);
position.setLongitude(lon);