From 48a5bd364b496de70a1a3eff8dd5c57c5d8fec9d Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 22 Jan 2018 19:53:48 +1300 Subject: Optimize date assignment --- src/org/traccar/reports/model/StopReport.java | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) (limited to 'src/org/traccar/reports/model/StopReport.java') diff --git a/src/org/traccar/reports/model/StopReport.java b/src/org/traccar/reports/model/StopReport.java index 6b2e86299..245292b63 100644 --- a/src/org/traccar/reports/model/StopReport.java +++ b/src/org/traccar/reports/model/StopReport.java @@ -53,37 +53,21 @@ public class StopReport extends BaseReport { private Date startTime; public Date getStartTime() { - if (startTime != null) { - return new Date(startTime.getTime()); - } else { - return null; - } + return startTime; } public void setStartTime(Date startTime) { - if (startTime != null) { - this.startTime = new Date(startTime.getTime()); - } else { - this.startTime = null; - } + this.startTime = startTime; } private Date endTime; public Date getEndTime() { - if (endTime != null) { - return new Date(endTime.getTime()); - } else { - return null; - } + return endTime; } public void setEndTime(Date endTime) { - if (endTime != null) { - this.endTime = new Date(endTime.getTime()); - } else { - this.endTime = null; - } + this.endTime = endTime; } private String address; -- cgit v1.2.3