From cf6aa038b7514201ffb89fa26a4ba7d921b8f16f Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 7 Jul 2024 12:48:35 -0700 Subject: Migrate to records --- src/main/java/org/traccar/api/resource/NotificationResource.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/org/traccar/api/resource/NotificationResource.java') diff --git a/src/main/java/org/traccar/api/resource/NotificationResource.java b/src/main/java/org/traccar/api/resource/NotificationResource.java index a41d00cf3..8bc81a3a4 100644 --- a/src/main/java/org/traccar/api/resource/NotificationResource.java +++ b/src/main/java/org/traccar/api/resource/NotificationResource.java @@ -85,7 +85,7 @@ public class NotificationResource extends ExtendedObjectResource { public Collection getNotificators(@QueryParam("announcement") boolean announcement) { Set announcementsUnsupported = Set.of("command", "web"); return notificatorManager.getAllNotificatorTypes().stream() - .filter(typed -> !announcement || !announcementsUnsupported.contains(typed.getType())) + .filter(typed -> !announcement || !announcementsUnsupported.contains(typed.type())) .collect(Collectors.toUnmodifiableSet()); } @@ -94,7 +94,7 @@ public class NotificationResource extends ExtendedObjectResource { public Response testMessage() throws MessageException, StorageException { User user = permissionsService.getUser(getUserId()); for (Typed method : notificatorManager.getAllNotificatorTypes()) { - notificatorManager.getNotificator(method.getType()).send(null, user, new Event("test", 0), null); + notificatorManager.getNotificator(method.type()).send(null, user, new Event("test", 0), null); } return Response.noContent().build(); } -- cgit v1.2.3