From: David ‘Bombe’ Roden Date: Wed, 16 Jan 2013 17:49:09 +0000 (+0100) Subject: Create a new set, the returned set is immutable. X-Git-Tag: 0.8.5^2~3^2~110 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=31d1991c365b01afcd14b56f8f15e4485647f8e7;p=Sone.git Create a new set, the returned set is immutable. --- 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()); }