Revert "Replace utils’ Numbers by Guava’s Optional and Ints/Longs.tryParse."
[Sone.git] / src / main / java / net / pterodactylus / sone / web / NewPage.java
index c7281e3..2d4ec55 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Sone - NewPage.java - Copyright © 2012 David Roden
+ * Sone - NewPage.java - Copyright © 2013 David Roden
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -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;
 
@@ -57,14 +58,14 @@ public class NewPage extends SoneTemplatePage {
        //
 
        /**
-        * {@inherit}
+        * {@inheritDoc}
         */
        @Override
        protected void processTemplate(FreenetRequest request, TemplateContext templateContext) throws RedirectException {
                super.processTemplate(request, templateContext);
 
                /* collect new elements from notifications. */
-               Set<Post> posts = webInterface.getNewPosts();
+               Set<Post> posts = new HashSet<Post>(webInterface.getNewPosts());
                for (PostReply reply : webInterface.getNewReplies()) {
                        posts.add(reply.getPost());
                }