Use final.

This commit is contained in:
Gary Gregory 2022-04-03 10:57:31 -04:00
parent 7c60085179
commit 777590c82c
2 changed files with 4 additions and 4 deletions

View File

@ -101,7 +101,7 @@ public class LocaleUtils {
return Collections.emptyList(); return Collections.emptyList();
} }
return cCountriesByLanguage.computeIfAbsent(languageCode, lc -> { return cCountriesByLanguage.computeIfAbsent(languageCode, lc -> {
List<Locale> countries = new ArrayList<>(); final List<Locale> countries = new ArrayList<>();
final List<Locale> locales = availableLocaleList(); final List<Locale> locales = availableLocaleList();
for (final Locale locale : locales) { for (final Locale locale : locales) {
if (languageCode.equals(locale.getLanguage()) && !locale.getCountry().isEmpty() && locale.getVariant().isEmpty()) { if (languageCode.equals(locale.getLanguage()) && !locale.getCountry().isEmpty() && locale.getVariant().isEmpty()) {
@ -167,7 +167,7 @@ public class LocaleUtils {
} }
return cLanguagesByCountry.computeIfAbsent(countryCode, k -> { return cLanguagesByCountry.computeIfAbsent(countryCode, k -> {
final List<Locale> locales = availableLocaleList(); final List<Locale> locales = availableLocaleList();
List<Locale> langs = new ArrayList<>(); final List<Locale> langs = new ArrayList<>();
for (final Locale locale : locales) { for (final Locale locale : locales) {
if (countryCode.equals(locale.getCountry()) && locale.getVariant().isEmpty()) { if (countryCode.equals(locale.getCountry()) && locale.getVariant().isEmpty()) {
langs.add(locale); langs.add(locale);

View File

@ -60,14 +60,14 @@ class GmtTimeZone extends TimeZone {
} }
@Override @Override
public boolean equals(Object obj) { public boolean equals(final Object obj) {
if (this == obj) { if (this == obj) {
return true; return true;
} }
if (!(obj instanceof GmtTimeZone)) { if (!(obj instanceof GmtTimeZone)) {
return false; return false;
} }
GmtTimeZone other = (GmtTimeZone) obj; final GmtTimeZone other = (GmtTimeZone) obj;
return offset == other.offset && Objects.equals(zoneId, other.zoneId); return offset == other.offset && Objects.equals(zoneId, other.zoneId);
} }