X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FWebInterface.java;h=cd776d7619248669482fcf62daa43112f7d744c2;hp=5342292f4e4c08fc534df211d4a85cc4ff1b9374;hb=2bacfa78f3191fd9847574a6c8b218a4882844a4;hpb=b9427df13c7231c3bc8ec787688d1240c1096f34 diff --git a/src/main/java/net/pterodactylus/sone/web/WebInterface.java b/src/main/java/net/pterodactylus/sone/web/WebInterface.java index 5342292..cd776d7 100644 --- a/src/main/java/net/pterodactylus/sone/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/sone/web/WebInterface.java @@ -237,7 +237,7 @@ public class WebInterface implements SessionProvider { private final SonePlugin sonePlugin; /** The registered toadlets. */ - private final List pageToadlets = new ArrayList(); + private final List pageToadlets = new ArrayList<>(); /** The form password. */ private final String formPassword; @@ -281,7 +281,7 @@ public class WebInterface implements SessionProvider { private final ListNotification mentionNotification; /** Notifications for sone inserts. */ - private final Map soneInsertNotifications = new HashMap(); + private final Map soneInsertNotifications = new HashMap<>(); /** Sone locked notification ticker objects. */ private final Map> lockedSonesTickerObjects = Collections.synchronizedMap(new HashMap>()); @@ -366,37 +366,37 @@ public class WebInterface implements SessionProvider { /* create notifications. */ Template newSoneNotificationTemplate = loaders.loadTemplate("/templates/notify/newSoneNotification.html"); - newSoneNotification = new ListNotification("new-sone-notification", "sones", newSoneNotificationTemplate, false); + newSoneNotification = new ListNotification<>("new-sone-notification", "sones", newSoneNotificationTemplate, false); Template newPostNotificationTemplate = loaders.loadTemplate("/templates/notify/newPostNotification.html"); - newPostNotification = new ListNotification("new-post-notification", "posts", newPostNotificationTemplate, false); + newPostNotification = new ListNotification<>("new-post-notification", "posts", newPostNotificationTemplate, false); Template localPostNotificationTemplate = loaders.loadTemplate("/templates/notify/newPostNotification.html"); - localPostNotification = new ListNotification("local-post-notification", "posts", localPostNotificationTemplate, false); + localPostNotification = new ListNotification<>("local-post-notification", "posts", localPostNotificationTemplate, false); Template newReplyNotificationTemplate = loaders.loadTemplate("/templates/notify/newReplyNotification.html"); - newReplyNotification = new ListNotification("new-reply-notification", "replies", newReplyNotificationTemplate, false); + newReplyNotification = new ListNotification<>("new-reply-notification", "replies", newReplyNotificationTemplate, false); Template localReplyNotificationTemplate = loaders.loadTemplate("/templates/notify/newReplyNotification.html"); - localReplyNotification = new ListNotification("local-reply-notification", "replies", localReplyNotificationTemplate, false); + localReplyNotification = new ListNotification<>("local-reply-notification", "replies", localReplyNotificationTemplate, false); Template mentionNotificationTemplate = loaders.loadTemplate("/templates/notify/mentionNotification.html"); - mentionNotification = new ListNotification("mention-notification", "posts", mentionNotificationTemplate, false); + mentionNotification = new ListNotification<>("mention-notification", "posts", mentionNotificationTemplate, false); Template lockedSonesTemplate = loaders.loadTemplate("/templates/notify/lockedSonesNotification.html"); - lockedSonesNotification = new ListNotification("sones-locked-notification", "sones", lockedSonesTemplate); + lockedSonesNotification = new ListNotification<>("sones-locked-notification", "sones", lockedSonesTemplate); Template newVersionTemplate = loaders.loadTemplate("/templates/notify/newVersionNotification.html"); newVersionNotification = new TemplateNotification("new-version-notification", newVersionTemplate); Template insertingImagesTemplate = loaders.loadTemplate("/templates/notify/inserting-images-notification.html"); - insertingImagesNotification = new ListNotification("inserting-images-notification", "images", insertingImagesTemplate); + insertingImagesNotification = new ListNotification<>("inserting-images-notification", "images", insertingImagesTemplate); Template insertedImagesTemplate = loaders.loadTemplate("/templates/notify/inserted-images-notification.html"); - insertedImagesNotification = new ListNotification("inserted-images-notification", "images", insertedImagesTemplate); + insertedImagesNotification = new ListNotification<>("inserted-images-notification", "images", insertedImagesTemplate); Template imageInsertFailedTemplate = loaders.loadTemplate("/templates/notify/image-insert-failed-notification.html"); - imageInsertFailedNotification = new ListNotification("image-insert-failed-notification", "images", imageInsertFailedTemplate); + imageInsertFailedNotification = new ListNotification<>("image-insert-failed-notification", "images", imageInsertFailedTemplate); } // @@ -829,7 +829,7 @@ public class WebInterface implements SessionProvider { */ private Collection getMentionedSones(String text) { /* we need no context to find mentioned Sones. */ - Set mentionedSones = new HashSet(); + Set mentionedSones = new HashSet<>(); for (Part part : soneTextParser.parse(text, null)) { if (part instanceof SonePart) { mentionedSones.add(((SonePart) part).getSone());