Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Dec 3, 2021. It is now read-only.

Commit 69bce7d

Browse files
Merge pull request Instabug#16 from Instabug/hotfix/fix-switch-case-error
Add missed switch case keywords
2 parents 062fc9e + 0f979ef commit 69bce7d

File tree

1 file changed

+36
-34
lines changed

1 file changed

+36
-34
lines changed

android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java

Lines changed: 36 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -432,40 +432,42 @@ public void setDebugEnabled(boolean isDebugEnabled) {
432432

433433
private Locale getLocaleByKey(String instabugLocale) {
434434
String localeInLowerCase = instabugLocale.toLowerCase();
435-
case LOCALE_ARABIC:
436-
return new Locale(InstabugLocale.ARABIC.getCode(), InstabugLocale.ARABIC.getCountry());
437-
case LOCALE_ENGLISH:
438-
return new Locale(InstabugLocale.ENGLISH.getCode(), InstabugLocale.ENGLISH.getCountry());
439-
case LOCALE_CZECH:
440-
return new Locale(InstabugLocale.CZECH.getCode(), InstabugLocale.CZECH.getCountry());
441-
case LOCALE_FRENCH:
442-
return new Locale(InstabugLocale.FRENCH.getCode(), InstabugLocale.FRENCH.getCountry());
443-
case LOCALE_GERMAN:
444-
return new Locale(InstabugLocale.GERMAN.getCode(), InstabugLocale.GERMAN.getCountry());
445-
case LOCALE_ITALIAN:
446-
return new Locale(InstabugLocale.ITALIAN.getCode(), InstabugLocale.ITALIAN.getCountry());
447-
case LOCALE_JAPANESE:
448-
return new Locale(InstabugLocale.JAPANESE.getCode(), InstabugLocale.JAPANESE.getCountry());
449-
case LOCALE_POLISH:
450-
return new Locale(InstabugLocale.POLISH.getCode(), InstabugLocale.POLISH.getCountry());
451-
case LOCALE_RUSSIAN:
452-
return new Locale(InstabugLocale.RUSSIAN.getCode(), InstabugLocale.RUSSIAN.getCountry());
453-
case LOCALE_SPANISH:
454-
return new Locale(InstabugLocale.SPANISH.getCode(), InstabugLocale.SPANISH.getCountry());
455-
case LOCALE_SWEDISH:
456-
return new Locale(InstabugLocale.SWEDISH.getCode(), InstabugLocale.SWEDISH.getCountry());
457-
case LOCALE_TURKISH:
458-
return new Locale(InstabugLocale.TURKISH.getCode(), InstabugLocale.TURKISH.getCountry());
459-
case LOCALE_PORTUGUESE_BRAZIL:
460-
return new Locale(InstabugLocale.PORTUGUESE_BRAZIL.getCode(), InstabugLocale.PORTUGUESE_BRAZIL.getCountry());
461-
case LOCALE_CHINESE_SIMPLIFIED:
462-
return new Locale(InstabugLocale.SIMPLIFIED_CHINESE.getCode(), InstabugLocale.SIMPLIFIED_CHINESE.getCountry());
463-
case LOCALE_CHINESE_TRADITIONAL:
464-
return new Locale(InstabugLocale.TRADITIONAL_CHINESE.getCode(), InstabugLocale.TRADITIONAL_CHINESE.getCountry());
465-
case LOCALE_KOREAN:
466-
return new Locale(InstabugLocale.KOREAN.getCode(), InstabugLocale.KOREAN.getCountry());
467-
default:
468-
return new Locale(InstabugLocale.ENGLISH.getCode(), InstabugLocale.ENGLISH.getCountry());
435+
switch (localeInLowerCase) {
436+
case LOCALE_ARABIC:
437+
return new Locale(InstabugLocale.ARABIC.getCode(), InstabugLocale.ARABIC.getCountry());
438+
case LOCALE_ENGLISH:
439+
return new Locale(InstabugLocale.ENGLISH.getCode(), InstabugLocale.ENGLISH.getCountry());
440+
case LOCALE_CZECH:
441+
return new Locale(InstabugLocale.CZECH.getCode(), InstabugLocale.CZECH.getCountry());
442+
case LOCALE_FRENCH:
443+
return new Locale(InstabugLocale.FRENCH.getCode(), InstabugLocale.FRENCH.getCountry());
444+
case LOCALE_GERMAN:
445+
return new Locale(InstabugLocale.GERMAN.getCode(), InstabugLocale.GERMAN.getCountry());
446+
case LOCALE_ITALIAN:
447+
return new Locale(InstabugLocale.ITALIAN.getCode(), InstabugLocale.ITALIAN.getCountry());
448+
case LOCALE_JAPANESE:
449+
return new Locale(InstabugLocale.JAPANESE.getCode(), InstabugLocale.JAPANESE.getCountry());
450+
case LOCALE_POLISH:
451+
return new Locale(InstabugLocale.POLISH.getCode(), InstabugLocale.POLISH.getCountry());
452+
case LOCALE_RUSSIAN:
453+
return new Locale(InstabugLocale.RUSSIAN.getCode(), InstabugLocale.RUSSIAN.getCountry());
454+
case LOCALE_SPANISH:
455+
return new Locale(InstabugLocale.SPANISH.getCode(), InstabugLocale.SPANISH.getCountry());
456+
case LOCALE_SWEDISH:
457+
return new Locale(InstabugLocale.SWEDISH.getCode(), InstabugLocale.SWEDISH.getCountry());
458+
case LOCALE_TURKISH:
459+
return new Locale(InstabugLocale.TURKISH.getCode(), InstabugLocale.TURKISH.getCountry());
460+
case LOCALE_PORTUGUESE_BRAZIL:
461+
return new Locale(InstabugLocale.PORTUGUESE_BRAZIL.getCode(), InstabugLocale.PORTUGUESE_BRAZIL.getCountry());
462+
case LOCALE_CHINESE_SIMPLIFIED:
463+
return new Locale(InstabugLocale.SIMPLIFIED_CHINESE.getCode(), InstabugLocale.SIMPLIFIED_CHINESE.getCountry());
464+
case LOCALE_CHINESE_TRADITIONAL:
465+
return new Locale(InstabugLocale.TRADITIONAL_CHINESE.getCode(), InstabugLocale.TRADITIONAL_CHINESE.getCountry());
466+
case LOCALE_KOREAN:
467+
return new Locale(InstabugLocale.KOREAN.getCode(), InstabugLocale.KOREAN.getCountry());
468+
default:
469+
return new Locale(InstabugLocale.ENGLISH.getCode(), InstabugLocale.ENGLISH.getCountry());
470+
}
469471
}
470472

471473
@Override

0 commit comments

Comments
 (0)