aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-07-21 17:44:57 +0500
committerAbyss777 <abyss@fox5.ru>2016-07-21 17:44:57 +0500
commite269c81b1b8044d051196e97f0884935c153feb0 (patch)
tree4162d2058c873860d58745e43c91c3dd86becb81 /src
parent35eea73b2b9e381efd5da60662f0f64f59b91406 (diff)
downloadtrackermap-server-e269c81b1b8044d051196e97f0884935c153feb0.tar.gz
trackermap-server-e269c81b1b8044d051196e97f0884935c153feb0.tar.bz2
trackermap-server-e269c81b1b8044d051196e97f0884935c153feb0.zip
Added parentheses
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/database/DeviceManager.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/database/DeviceManager.java b/src/org/traccar/database/DeviceManager.java
index f442dfb19..4dd7b41cb 100644
--- a/src/org/traccar/database/DeviceManager.java
+++ b/src/org/traccar/database/DeviceManager.java
@@ -70,7 +70,7 @@ public class DeviceManager implements IdentityManager {
private void updateDeviceCache(boolean force) throws SQLException {
long lastUpdate = devicesLastUpdate.get();
- if (force || System.currentTimeMillis() - lastUpdate > dataRefreshDelay
+ if ((force || System.currentTimeMillis() - lastUpdate > dataRefreshDelay)
&& devicesLastUpdate.compareAndSet(lastUpdate, System.currentTimeMillis())) {
GeofenceManager geofenceManager = Context.getGeofenceManager();
Collection<Device> databaseDevices = dataManager.getAllDevices();
@@ -233,7 +233,7 @@ public class DeviceManager implements IdentityManager {
private void updateGroupCache(boolean force) throws SQLException {
long lastUpdate = groupsLastUpdate.get();
- if (force || System.currentTimeMillis() - lastUpdate > dataRefreshDelay
+ if ((force || System.currentTimeMillis() - lastUpdate > dataRefreshDelay)
&& groupsLastUpdate.compareAndSet(lastUpdate, System.currentTimeMillis())) {
Collection<Group> databaseGroups = dataManager.getAllGroups();
if (groupsById == null) {