From 415349ab7192e1cc15f40dd420171afb5c36233d Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Tue, 14 Mar 2017 18:20:50 +0800 Subject: [PATCH] Remove unnecessary memoize() calls --- source/net/filebot/WebServices.java | 8 ++------ source/net/filebot/web/AnidbClient.java | 4 +--- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/source/net/filebot/WebServices.java b/source/net/filebot/WebServices.java index 8c6e40ec..ab6bf39a 100644 --- a/source/net/filebot/WebServices.java +++ b/source/net/filebot/WebServices.java @@ -133,9 +133,7 @@ public final class WebServices { } // local TheTVDB search index - private final Resource> localIndex = Resource.lazy(() -> { - return new LocalSearch(releaseInfo.getTheTVDBIndex(), SearchResult::getEffectiveNames); - }).memoize(); + private final Resource> localIndex = Resource.lazy(() -> new LocalSearch(releaseInfo.getTheTVDBIndex(), SearchResult::getEffectiveNames)); private SearchResult merge(SearchResult prime, List group) { int id = prime.getId(); @@ -177,9 +175,7 @@ public final class WebServices { } // local OpenSubtitles search index - private final Resource> localIndex = Resource.lazy(() -> { - return new LocalSearch(releaseInfo.getOpenSubtitlesIndex(), SearchResult::getEffectiveNames); - }).memoize(); + private final Resource> localIndex = Resource.lazy(() -> new LocalSearch(releaseInfo.getOpenSubtitlesIndex(), SearchResult::getEffectiveNames)); @Override public List search(final String query) throws Exception { diff --git a/source/net/filebot/web/AnidbClient.java b/source/net/filebot/web/AnidbClient.java index ab8af173..24251d19 100644 --- a/source/net/filebot/web/AnidbClient.java +++ b/source/net/filebot/web/AnidbClient.java @@ -80,9 +80,7 @@ public class AnidbClient extends AbstractEpisodeListProvider { } // local AniDB search index - private final Resource> localIndex = Resource.lazy(() -> { - return new LocalSearch(getAnimeTitles(), SearchResult::getEffectiveNames); - }).memoize(); + private final Resource> localIndex = Resource.lazy(() -> new LocalSearch(getAnimeTitles(), SearchResult::getEffectiveNames)); @Override public List fetchSearchResult(String query, Locale locale) throws Exception {