aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-03-06 15:40:46 -0800
committerAnton Tananaev <anton@traccar.org>2022-03-06 15:40:46 -0800
commite5377cf87d3153f6f33bf20e48af1a2431ee052e (patch)
tree718d2baedb08fd7f5741f1a0e2da5f97f5659cab /src/main/java/org/traccar
parent90dd949c149c4acf9bc383dd019a595808be928e (diff)
downloadtrackermap-server-e5377cf87d3153f6f33bf20e48af1a2431ee052e.tar.gz
trackermap-server-e5377cf87d3153f6f33bf20e48af1a2431ee052e.tar.bz2
trackermap-server-e5377cf87d3153f6f33bf20e48af1a2431ee052e.zip
Simplify device model
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r--src/main/java/org/traccar/model/Device.java14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/main/java/org/traccar/model/Device.java b/src/main/java/org/traccar/model/Device.java
index 836a6709c..219f078ed 100644
--- a/src/main/java/org/traccar/model/Device.java
+++ b/src/main/java/org/traccar/model/Device.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 - 2018 Anton Tananaev (anton@traccar.org)
+ * Copyright 2012 - 2022 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.
@@ -64,20 +64,12 @@ public class Device extends GroupedModel {
private Date lastUpdate;
public Date getLastUpdate() {
- if (lastUpdate != null) {
- return new Date(lastUpdate.getTime());
- } else {
- return null;
- }
+ return this.lastUpdate;
}
@QueryExtended
public void setLastUpdate(Date lastUpdate) {
- if (lastUpdate != null) {
- this.lastUpdate = new Date(lastUpdate.getTime());
- } else {
- this.lastUpdate = null;
- }
+ this.lastUpdate = lastUpdate;
}
private long positionId;