1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2025-01-27 10:07:32 +01:00

Removed unnecessary containsKey check.

This commit is contained in:
Utsob Roy 2018-09-01 08:59:57 +06:00
parent 8e8fa24652
commit 91ddb2c3dd

View File

@ -138,12 +138,12 @@ public class BengaliLanguageUtils extends LanguageUtils {
private static String getVal(String key) {
if (key != null) {
boolean hasKey = composites.containsKey(key);
if (hasKey) {
return composites.get(key);
String comp = composites.get(key);
if (comp != null) {
return comp;
}
hasKey = letters.containsKey(key);
if (hasKey) {
String sl = letters.get(key);
if (sl != null) {
return letters.get(key);
}
}
@ -195,9 +195,9 @@ public class BengaliLanguageUtils extends LanguageUtils {
}
String kaar = m.group(10);
if (kaar != null) {
boolean hasKey = letters.containsKey(kaar);
if (hasKey) {
appendableString = appendableString + letters.get(kaar);
String kaarStr = letters.get(kaar);
if (kaarStr != null) {
appendableString = appendableString + kaarStr;
}
} else if (appendableString.length() > 0 && !vowelsAndHasants.containsKey(m.group(0))) {
// Adding 'a' like ITRANS if no vowel is present.
@ -206,9 +206,9 @@ public class BengaliLanguageUtils extends LanguageUtils {
}
String singleton = m.group(11);
if (singleton != null) {
boolean hasKeyS = letters.containsKey(singleton);
if (hasKeyS) {
appendableString = appendableString + letters.get(singleton);
String singleStr = letters.get(singleton);
if (singleStr != null) {
appendableString = appendableString + singleStr;
}
}
String others = m.group(0);