aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/model
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2018-06-26 12:05:16 +0500
committerAbyss777 <abyss@fox5.ru>2018-06-26 12:05:16 +0500
commit825ee0d178a24620f075cb4ffb8d49c75b046484 (patch)
tree2bc60aaea8d4c1eff707ae6e0b8ff558d45d15dc /src/org/traccar/model
parentaba402226403f8b3eb58cc01e8f536eb4104d35a (diff)
downloadtrackermap-server-825ee0d178a24620f075cb4ffb8d49c75b046484.tar.gz
trackermap-server-825ee0d178a24620f075cb4ffb8d49c75b046484.tar.bz2
trackermap-server-825ee0d178a24620f075cb4ffb8d49c75b046484.zip
Cleanup and some adjustments
Diffstat (limited to 'src/org/traccar/model')
-rw-r--r--src/org/traccar/model/Notification.java18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/org/traccar/model/Notification.java b/src/org/traccar/model/Notification.java
index 0b632c861..4923798c2 100644
--- a/src/org/traccar/model/Notification.java
+++ b/src/org/traccar/model/Notification.java
@@ -18,6 +18,10 @@ package org.traccar.model;
import java.util.HashSet;
import java.util.Set;
+import org.traccar.database.QueryIgnore;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
public class Notification extends ScheduledModel {
private boolean always;
@@ -52,13 +56,17 @@ public class Notification extends ScheduledModel {
}
+ @JsonIgnore
+ @QueryIgnore
public Set<String> getTransportMethods() {
- final Set<String> set = new HashSet<>();
- final String[] tmp = transports.split(",");
- for (String t : tmp) {
- set.add(t.trim());
+ final Set<String> result = new HashSet<>();
+ if (transports != null) {
+ final String[] transportsList = transports.split(",");
+ for (String transport : transportsList) {
+ result.add(transport.trim());
+ }
}
- return set;
+ return result;
}
}