X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2FSearchPage.java;h=6e10b249adf7b5c2c7c4490d5f0b96c6af3bfb1a;hp=42f0a821cf09f1e11661631c5dd8e6c63e3a4225;hb=a8d443ca97ae7a9707b19bfd90cb521cf02b106c;hpb=0df5e91852f737d760c5a9f54c5667309fbadcc2 diff --git a/src/main/java/net/pterodactylus/sone/web/SearchPage.java b/src/main/java/net/pterodactylus/sone/web/SearchPage.java index 42f0a82..6e10b24 100644 --- a/src/main/java/net/pterodactylus/sone/web/SearchPage.java +++ b/src/main/java/net/pterodactylus/sone/web/SearchPage.java @@ -28,6 +28,7 @@ import java.util.logging.Level; import java.util.logging.Logger; import net.pterodactylus.sone.data.Post; +import net.pterodactylus.sone.data.PostReply; import net.pterodactylus.sone.data.Profile; import net.pterodactylus.sone.data.Profile.Field; import net.pterodactylus.sone.data.Reply; @@ -66,6 +67,7 @@ public class SearchPage extends SoneTemplatePage { /** Short-term cache. */ private final Cache, Set>> hitCache = new MemoryCache, Set>>(new ValueRetriever, Set>>() { + @Override @SuppressWarnings("synthetic-access") public CacheItem>> retrieve(List phrases) throws CacheException { Set posts = new HashSet(); @@ -365,7 +367,7 @@ public class SearchPage extends SoneTemplatePage { if (post.getRecipient() != null) { postString.append(' ').append(SoneStringGenerator.NAME_GENERATOR.generateString(post.getRecipient())); } - for (Reply reply : Filters.filteredList(webInterface.getCore().getReplies(post), Reply.FUTURE_REPLIES_FILTER)) { + for (PostReply reply : Filters.filteredList(webInterface.getCore().getReplies(post), Reply.FUTURE_REPLY_FILTER)) { postString.append(' ').append(SoneStringGenerator.NAME_GENERATOR.generateString(reply.getSone())); postString.append(' ').append(reply.getText()); } @@ -457,7 +459,6 @@ public class SearchPage extends SoneTemplatePage { if (!(object instanceof Phrase)) { return false; } - @SuppressWarnings("hiding") Phrase phrase = (Phrase) object; return (this.optionality == phrase.optionality) && this.phrase.equals(phrase.phrase); }