import java.util.ArrayList;
import java.util.Collections;
+import java.util.HashSet;
import java.util.List;
import java.util.Set;
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());
}