aboutsummaryrefslogtreecommitdiff
path: root/test/org
diff options
context:
space:
mode:
Diffstat (limited to 'test/org')
-rw-r--r--test/org/traccar/ProtocolTest.java8
-rw-r--r--test/org/traccar/reports/ReportUtilsTest.java4
2 files changed, 4 insertions, 8 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);
diff --git a/test/org/traccar/reports/ReportUtilsTest.java b/test/org/traccar/reports/ReportUtilsTest.java
index 4f7a4eb68..0e26c7e75 100644
--- a/test/org/traccar/reports/ReportUtilsTest.java
+++ b/test/org/traccar/reports/ReportUtilsTest.java
@@ -35,9 +35,7 @@ public class ReportUtilsTest extends BaseTest {
Position position = new Position();
- if (time != null) {
- position.setTime(date(time));
- }
+ position.setTime(date(time));
position.setValid(true);
position.setSpeed(speed);
position.set(Position.KEY_TOTAL_DISTANCE, totalDistance);