Update years in copyright line
[Sone.git] / src / main / java / net / pterodactylus / sone / web / SoneTemplatePage.java
index b0d31d2..15810ca 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Sone - SoneTemplatePage.java - Copyright © 2010 David Roden
+ * Sone - SoneTemplatePage.java - Copyright © 2010–2015 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
@@ -30,12 +30,13 @@ import net.pterodactylus.sone.main.SonePlugin;
 import net.pterodactylus.sone.notify.ListNotificationFilters;
 import net.pterodactylus.sone.web.page.FreenetRequest;
 import net.pterodactylus.sone.web.page.FreenetTemplatePage;
-import net.pterodactylus.util.collection.ListBuilder;
-import net.pterodactylus.util.collection.MapBuilder;
 import net.pterodactylus.util.notify.Notification;
-import net.pterodactylus.util.object.HashCode;
 import net.pterodactylus.util.template.Template;
 import net.pterodactylus.util.template.TemplateContext;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
+
 import freenet.clients.http.SessionManager.Session;
 import freenet.clients.http.ToadletContext;
 import freenet.support.api.HTTPRequest;
@@ -217,7 +218,7 @@ public class SoneTemplatePage extends FreenetTemplatePage {
         */
        @Override
        protected List<Map<String, String>> getAdditionalLinkNodes(FreenetRequest request) {
-               return new ListBuilder<Map<String, String>>().add(new MapBuilder<String, String>().put("rel", "search").put("type", "application/opensearchdescription+xml").put("title", "Sone").put("href", "http://" + request.getHttpRequest().getHeader("host") + "/Sone/OpenSearch.xml").get()).get();
+               return ImmutableList.<Map<String, String>> builder().add(ImmutableMap.<String, String> builder().put("rel", "search").put("type", "application/opensearchdescription+xml").put("title", "Sone").put("href", "http://" + request.getHttpRequest().getHeader("host") + "/Sone/OpenSearch.xml").build()).build();
        }
 
        /**
@@ -265,7 +266,7 @@ public class SoneTemplatePage extends FreenetTemplatePage {
                List<Notification> notifications = ListNotificationFilters.filterNotifications(webInterface.getNotifications().getNotifications(), currentSone);
                Collections.sort(notifications, Notification.CREATED_TIME_SORTER);
                templateContext.set("notifications", notifications);
-               templateContext.set("notificationHash", HashCode.hashCode(notifications));
+               templateContext.set("notificationHash", notifications.hashCode());
        }
 
        /**