From 31d1991c365b01afcd14b56f8f15e4485647f8e7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 16 Jan 2013 18:49:09 +0100 Subject: [PATCH] Create a new set, the returned set is immutable. --- src/main/java/net/pterodactylus/sone/web/NewPage.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/pterodactylus/sone/web/NewPage.java b/src/main/java/net/pterodactylus/sone/web/NewPage.java index c7281e3..e1edc25 100644 --- a/src/main/java/net/pterodactylus/sone/web/NewPage.java +++ b/src/main/java/net/pterodactylus/sone/web/NewPage.java @@ -19,6 +19,7 @@ package net.pterodactylus.sone.web; import java.util.ArrayList; import java.util.Collections; +import java.util.HashSet; import java.util.List; import java.util.Set; @@ -64,7 +65,7 @@ public class NewPage extends SoneTemplatePage { super.processTemplate(request, templateContext); /* collect new elements from notifications. */ - Set posts = webInterface.getNewPosts(); + Set posts = new HashSet(webInterface.getNewPosts()); for (PostReply reply : webInterface.getNewReplies()) { posts.add(reply.getPost()); } -- 2.7.4