aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-08-22 23:33:42 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2017-08-22 23:33:42 +1200
commit10e801928c521456fa54019d878093dc0538de8a (patch)
tree32d1b4a285272ef4df73e13a2215c8f914152659
parent7b486504294329c6ac9f6395e3c6b7ca7000acd7 (diff)
downloadtrackermap-server-10e801928c521456fa54019d878093dc0538de8a.tar.gz
trackermap-server-10e801928c521456fa54019d878093dc0538de8a.tar.bz2
trackermap-server-10e801928c521456fa54019d878093dc0538de8a.zip
Clean up events constructor
-rw-r--r--src/org/traccar/model/Event.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/org/traccar/model/Event.java b/src/org/traccar/model/Event.java
index 2d836abeb..47b60af01 100644
--- a/src/org/traccar/model/Event.java
+++ b/src/org/traccar/model/Event.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016 Anton Tananaev (anton@traccar.org)
+ * Copyright 2016 - 2017 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,15 +20,13 @@ import java.util.Date;
public class Event extends Message {
public Event(String type, long deviceId, long positionId) {
- this.setType(type);
- this.setDeviceId(deviceId);
- this.setPositionId(positionId);
- this.serverTime = new Date();
+ this(type, deviceId);
+ setPositionId(positionId);
}
public Event(String type, long deviceId) {
- this.setType(type);
- this.setDeviceId(deviceId);
+ setType(type);
+ setDeviceId(deviceId);
this.serverTime = new Date();
}