From cb0593e2cd4c025a55333ed5ee6fb030d78d746d Mon Sep 17 00:00:00 2001 From: simon Date: Fri, 4 Dec 2020 15:12:28 +0200 Subject: [PATCH] improvements --- .../net/osmand/plus/wikivoyage/data/TravelObfHelper.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelObfHelper.java b/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelObfHelper.java index 45141118f5..9ccdc5f6c8 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelObfHelper.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelObfHelper.java @@ -20,7 +20,6 @@ import net.osmand.plus.R; import net.osmand.util.Algorithms; import net.osmand.util.MapUtils; -import org.apache.commons.compress.utils.Lists; import org.apache.commons.logging.Log; import java.io.File; @@ -159,17 +158,17 @@ public class TravelObfHelper implements TravelHelper { res.add(searchResult); } } - res = Lists.newArrayList(groupSearchResultsByCityId(res).iterator()); + res = new ArrayList<>(groupSearchResultsByCityId(res)); sortSearchResults(searchQuery, res); return res; } private WikivoyageSearchResult convertArticleToSearchResult(TravelArticle article) { WikivoyageSearchResult searchResult = new WikivoyageSearchResult(); - searchResult.articleTitles = Collections.singletonList(article.title); - searchResult.isPartOf = Collections.singletonList(article.isPartOf); + searchResult.articleTitles = new ArrayList<>(Collections.singletonList(article.title)); + searchResult.isPartOf = new ArrayList<>(Collections.singletonList(article.isPartOf)); searchResult.imageTitle = article.imageTitle; - searchResult.langs = Collections.singletonList(article.lang); + searchResult.langs = new ArrayList<>(Collections.singletonList(article.lang)); searchResult.tripId = article.tripId; return searchResult; }