aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/model/User.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 /src/org/traccar/model/User.java
parent58ade656e2070387f95984f5851cbc41990467ba (diff)
downloadtrackermap-server-48a5bd364b496de70a1a3eff8dd5c57c5d8fec9d.tar.gz
trackermap-server-48a5bd364b496de70a1a3eff8dd5c57c5d8fec9d.tar.bz2
trackermap-server-48a5bd364b496de70a1a3eff8dd5c57c5d8fec9d.zip
Optimize date assignment
Diffstat (limited to 'src/org/traccar/model/User.java')
-rw-r--r--src/org/traccar/model/User.java12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/org/traccar/model/User.java b/src/org/traccar/model/User.java
index 7f97d4781..1a131a4e8 100644
--- a/src/org/traccar/model/User.java
+++ b/src/org/traccar/model/User.java
@@ -158,19 +158,11 @@ public class User extends ExtendedModel {
private Date expirationTime;
public Date getExpirationTime() {
- if (expirationTime != null) {
- return new Date(expirationTime.getTime());
- } else {
- return null;
- }
+ return expirationTime;
}
public void setExpirationTime(Date expirationTime) {
- if (expirationTime != null) {
- this.expirationTime = new Date(expirationTime.getTime());
- } else {
- this.expirationTime = null;
- }
+ this.expirationTime = expirationTime;
}
private int deviceLimit;