From d766553c0918f2522e8d6314b7dc3aca6f78eb7d Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 17 Nov 2016 20:37:08 +0100 Subject: [PATCH] Use diamond operator for constructor calls --- .../net/pterodactylus/sone/template/ReplyGroupFilter.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/template/ReplyGroupFilter.java b/src/main/java/net/pterodactylus/sone/template/ReplyGroupFilter.java index 9bb5b81..76ca103 100644 --- a/src/main/java/net/pterodactylus/sone/template/ReplyGroupFilter.java +++ b/src/main/java/net/pterodactylus/sone/template/ReplyGroupFilter.java @@ -48,8 +48,8 @@ public class ReplyGroupFilter implements Filter { public Object format(TemplateContext templateContext, Object data, Map parameters) { @SuppressWarnings("unchecked") List allReplies = (List) data; - Map> postSones = new HashMap>(); - Map> postReplies = new HashMap>(); + Map> postSones = new HashMap<>(); + Map> postReplies = new HashMap<>(); for (PostReply reply : allReplies) { /* * All replies from a new-reply notification have posts, @@ -58,23 +58,23 @@ public class ReplyGroupFilter implements Filter { Optional post = reply.getPost(); Set sones = postSones.get(post.get()); if (sones == null) { - sones = new HashSet(); + sones = new HashSet<>(); postSones.put(post.get(), sones); } sones.add(reply.getSone()); Set replies = postReplies.get(post.get()); if (replies == null) { - replies = new HashSet(); + replies = new HashSet<>(); postReplies.put(post.get(), replies); } replies.add(reply); } - Map>> result = new HashMap>>(); + Map>> result = new HashMap<>(); for (Entry> postEntry : postSones.entrySet()) { if (result.containsKey(postEntry.getKey())) { continue; } - Map> postResult = new HashMap>(); + Map> postResult = new HashMap<>(); postResult.put("sones", postEntry.getValue()); postResult.put("replies", postReplies.get(postEntry.getKey())); result.put(postEntry.getKey(), postResult); -- 2.7.4