aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database/UsersManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-07-27 23:03:11 +1200
committerGitHub <noreply@github.com>2017-07-27 23:03:11 +1200
commit5d6dec7818a8059c958fc896eb1de838fda52a8c (patch)
treef5759e40bbf8f9e3a4cee79b9829b27dbbef47c6 /src/org/traccar/database/UsersManager.java
parent495b2aa2d2b17bd1a5803ea0bd7dcc64bc81c598 (diff)
parentec82098c6bc3c84672665552839a97ddb6771afc (diff)
downloadtrackermap-server-5d6dec7818a8059c958fc896eb1de838fda52a8c.tar.gz
trackermap-server-5d6dec7818a8059c958fc896eb1de838fda52a8c.tar.bz2
trackermap-server-5d6dec7818a8059c958fc896eb1de838fda52a8c.zip
Merge pull request #3397 from Abyss777/fix_empty_devices
Initialize some maps, because they might be accessed before initialized.
Diffstat (limited to 'src/org/traccar/database/UsersManager.java')
-rw-r--r--src/org/traccar/database/UsersManager.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/org/traccar/database/UsersManager.java b/src/org/traccar/database/UsersManager.java
index 28e6a31b2..ed39f6cfa 100644
--- a/src/org/traccar/database/UsersManager.java
+++ b/src/org/traccar/database/UsersManager.java
@@ -29,6 +29,9 @@ public class UsersManager extends SimpleObjectManager<User> {
public UsersManager(DataManager dataManager) {
super(dataManager, User.class);
+ if (usersTokens == null) {
+ usersTokens = new ConcurrentHashMap<>();
+ }
}
private void putToken(User user) {