aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/model
diff options
context:
space:
mode:
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;
}
}