diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelLocalDataHelper.java b/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelLocalDataHelper.java index a95438a77e..c2ccc442c3 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelLocalDataHelper.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelLocalDataHelper.java @@ -143,8 +143,8 @@ public class TravelLocalDataHelper { @Nullable private TravelArticle getArticle(String title, String lang) { for (TravelArticle article : savedArticles) { - if (article.title != null && article.title.equals(title) - && (article.lang != null && article.lang.equals(lang) || article.lang == null && lang == null)) { + if (Algorithms.stringsEqual(article.title, title) + && Algorithms.stringsEqual(article.lang, lang)) { return article; } } diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelObfHelper.java b/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelObfHelper.java index ab9e926c10..294cf2cd13 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelObfHelper.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/data/TravelObfHelper.java @@ -165,7 +165,7 @@ public class TravelObfHelper implements TravelHelper { private TravelArticle cacheTravelArticles(File file, Amenity amenity, String lang, boolean readPoints, @Nullable GpxReadCallback callback) { TravelArticle article = null; Map articles; - if (Algorithms.objectEquals(amenity.getSubType(), ROUTE_TRACK)) { + if (ROUTE_TRACK.equals(amenity.getSubType())) { articles = readRoutePoint(file, amenity); } else { articles = readArticles(file, amenity);