From: David ‘Bombe’ Roden Date: Wed, 16 Jan 2013 11:49:22 +0000 (+0100) Subject: Replace utils’ SetBuilder by Guava’s ImmutableSet.Builder. X-Git-Tag: 0.8.5^2~3^2~126 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=1b525dcdbd58c5d73dd865e0f1b2b8cc6ddcc4eb Replace utils’ SetBuilder by Guava’s ImmutableSet.Builder. --- diff --git a/src/main/java/net/pterodactylus/sone/web/WebInterface.java b/src/main/java/net/pterodactylus/sone/web/WebInterface.java index 436ed5f..188cc7f 100644 --- a/src/main/java/net/pterodactylus/sone/web/WebInterface.java +++ b/src/main/java/net/pterodactylus/sone/web/WebInterface.java @@ -103,7 +103,6 @@ import net.pterodactylus.sone.web.ajax.UntrustAjaxPage; import net.pterodactylus.sone.web.page.FreenetRequest; import net.pterodactylus.sone.web.page.PageToadlet; import net.pterodactylus.sone.web.page.PageToadletFactory; -import net.pterodactylus.util.collection.SetBuilder; import net.pterodactylus.util.logging.Logging; import net.pterodactylus.util.notify.Notification; import net.pterodactylus.util.notify.NotificationManager; @@ -132,6 +131,7 @@ import net.pterodactylus.util.web.StaticPage; import net.pterodactylus.util.web.TemplatePage; import com.google.common.collect.Collections2; +import com.google.common.collect.ImmutableSet; import com.google.inject.Inject; import freenet.clients.http.SessionManager; @@ -462,7 +462,7 @@ public class WebInterface implements CoreListener { * @return The new posts */ public Set getNewPosts() { - return new SetBuilder().addAll(newPostNotification.getElements()).addAll(localPostNotification.getElements()).get(); + return ImmutableSet. builder().addAll(newPostNotification.getElements()).addAll(localPostNotification.getElements()).build(); } /** @@ -472,7 +472,7 @@ public class WebInterface implements CoreListener { * @return The new replies */ public Set getNewReplies() { - return new SetBuilder().addAll(newReplyNotification.getElements()).addAll(localReplyNotification.getElements()).get(); + return ImmutableSet. builder().addAll(newReplyNotification.getElements()).addAll(localReplyNotification.getElements()).build(); } /**