diff options
author | Anton Tananaev <anton@traccar.org> | 2022-03-06 15:40:46 -0800 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-03-06 15:40:46 -0800 |
commit | e5377cf87d3153f6f33bf20e48af1a2431ee052e (patch) | |
tree | 718d2baedb08fd7f5741f1a0e2da5f97f5659cab /src/main/java/org/traccar/model | |
parent | 90dd949c149c4acf9bc383dd019a595808be928e (diff) | |
download | trackermap-server-e5377cf87d3153f6f33bf20e48af1a2431ee052e.tar.gz trackermap-server-e5377cf87d3153f6f33bf20e48af1a2431ee052e.tar.bz2 trackermap-server-e5377cf87d3153f6f33bf20e48af1a2431ee052e.zip |
Simplify device model
Diffstat (limited to 'src/main/java/org/traccar/model')
-rw-r--r-- | src/main/java/org/traccar/model/Device.java | 14 |
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; |