Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/ListedSubscriptionsPreferenceCategory.java

Issue 29436555: Issue 5231 - Use Java 7 features (Closed)
Patch Set: Created May 11, 2017, 6:30 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/ListedSubscriptionsPreferenceCategory.java
===================================================================
--- a/adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/ListedSubscriptionsPreferenceCategory.java
+++ b/adblockplussbrowser/src/org/adblockplus/sbrowser/contentblocker/ListedSubscriptionsPreferenceCategory.java
@@ -47,17 +47,17 @@ public class ListedSubscriptionsPreferen
private boolean isEnabledView = false;
private static final String[] LANGUAGE_TRANSLATIONS =
{
"id", "Bahasa Indonesia",
"he", "עברית"
};
- private static final HashMap<String, String> LANGUAGE_TRANSLATION_MAP = new HashMap<String, String>();
+ private static final HashMap<String, String> LANGUAGE_TRANSLATION_MAP = new HashMap<>();
static
{
for (int i = 0; i < LANGUAGE_TRANSLATIONS.length; i += 2)
{
LANGUAGE_TRANSLATION_MAP.put(LANGUAGE_TRANSLATIONS[i], LANGUAGE_TRANSLATIONS[i + 1]);
}
}
@@ -86,17 +86,17 @@ public class ListedSubscriptionsPreferen
}
@Override
public void onEngineCreated(final Engine engine, final boolean success)
{
this.engine = engine;
this.isEnabledView = this.getTitleRes() == R.string.enabled_subscriptions;
- final HashMap<String, Locale> localeMap = new HashMap<String, Locale>();
+ final HashMap<String, Locale> localeMap = new HashMap<>();
for (final Locale l : Locale.getAvailableLocales())
{
final String lang = l.getLanguage();
if (!lang.isEmpty())
{
localeMap.put(lang.toLowerCase(), l);
}
}

Powered by Google App Engine
This is Rietveld