X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fnotify%2FListNotificationFilter.java;h=230835359cef398f69a9d99ef69fa69288f73efd;hp=5db5258a5287bed27507fb3d46aa83e873d38c49;hb=2bacfa78f3191fd9847574a6c8b218a4882844a4;hpb=b9427df13c7231c3bc8ec787688d1240c1096f34 diff --git a/src/main/java/net/pterodactylus/sone/notify/ListNotificationFilter.java b/src/main/java/net/pterodactylus/sone/notify/ListNotificationFilter.java index 5db5258..2308353 100644 --- a/src/main/java/net/pterodactylus/sone/notify/ListNotificationFilter.java +++ b/src/main/java/net/pterodactylus/sone/notify/ListNotificationFilter.java @@ -65,7 +65,7 @@ public class ListNotificationFilter { */ @SuppressWarnings("unchecked") public List filterNotifications(Collection notifications, Sone currentSone) { - List filteredNotifications = new ArrayList(); + List filteredNotifications = new ArrayList<>(); for (Notification notification : notifications) { if (notification.getId().equals("new-sone-notification")) { if ((currentSone != null) && !currentSone.getOptions().isShowNewSoneNotifications()) { @@ -126,7 +126,7 @@ public class ListNotificationFilter { if (newPosts.size() == postNotification.getElements().size()) { return Optional.of(postNotification); } - ListNotification filteredNotification = new ListNotification(postNotification); + ListNotification filteredNotification = new ListNotification<>(postNotification); filteredNotification.setElements(newPosts); filteredNotification.setLastUpdateTime(postNotification.getLastUpdatedTime()); return Optional.of(filteredNotification); @@ -155,7 +155,7 @@ public class ListNotificationFilter { if (newReplies.size() == newReplyNotification.getElements().size()) { return Optional.of(newReplyNotification); } - ListNotification filteredNotification = new ListNotification(newReplyNotification); + ListNotification filteredNotification = new ListNotification<>(newReplyNotification); filteredNotification.setElements(newReplies); filteredNotification.setLastUpdateTime(newReplyNotification.getLastUpdatedTime()); return Optional.of(filteredNotification);