aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-07-18 17:08:52 -0700
committerAnton Tananaev <anton@traccar.org>2022-07-18 17:08:52 -0700
commiteb79bc251669ed8d107aaf1e2a6beeb0743eacf7 (patch)
tree3c1b80f6a965e652b9df47858d9be3434d6baec8 /src/main
parent8bc3c8c7d2c762ec00bfb1960dcd02171b7312a6 (diff)
downloadtrackermap-server-eb79bc251669ed8d107aaf1e2a6beeb0743eacf7.tar.gz
trackermap-server-eb79bc251669ed8d107aaf1e2a6beeb0743eacf7.tar.bz2
trackermap-server-eb79bc251669ed8d107aaf1e2a6beeb0743eacf7.zip
Improve event type order
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/traccar/api/resource/NotificationResource.java33
1 files changed, 16 insertions, 17 deletions
diff --git a/src/main/java/org/traccar/api/resource/NotificationResource.java b/src/main/java/org/traccar/api/resource/NotificationResource.java
index a42de687d..2e4ad12f3 100644
--- a/src/main/java/org/traccar/api/resource/NotificationResource.java
+++ b/src/main/java/org/traccar/api/resource/NotificationResource.java
@@ -15,22 +15,6 @@
*/
package org.traccar.api.resource;
-import java.lang.reflect.Field;
-import java.lang.reflect.Modifier;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.inject.Inject;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.traccar.api.ExtendedObjectResource;
@@ -42,6 +26,21 @@ import org.traccar.notification.MessageException;
import org.traccar.notification.NotificatorManager;
import org.traccar.storage.StorageException;
+import javax.inject.Inject;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.util.Collection;
+import java.util.LinkedList;
+import java.util.List;
+
@Path("notifications")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
@@ -59,7 +58,7 @@ public class NotificationResource extends ExtendedObjectResource<Notification> {
@GET
@Path("types")
public Collection<Typed> get() {
- Set<Typed> types = new HashSet<>();
+ List<Typed> types = new LinkedList<>();
Field[] fields = Event.class.getDeclaredFields();
for (Field field : fields) {
if (Modifier.isStatic(field.getModifiers()) && field.getName().startsWith("TYPE_")) {