1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2025-02-05 22:46:48 +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) { private static String getVal(String key) {
if (key != null) { if (key != null) {
boolean hasKey = composites.containsKey(key); String comp = composites.get(key);
if (hasKey) { if (comp != null) {
return composites.get(key); return comp;
} }
hasKey = letters.containsKey(key); String sl = letters.get(key);
if (hasKey) { if (sl != null) {
return letters.get(key); return letters.get(key);
} }
} }
@ -195,9 +195,9 @@ public class BengaliLanguageUtils extends LanguageUtils {
} }
String kaar = m.group(10); String kaar = m.group(10);
if (kaar != null) { if (kaar != null) {
boolean hasKey = letters.containsKey(kaar); String kaarStr = letters.get(kaar);
if (hasKey) { if (kaarStr != null) {
appendableString = appendableString + letters.get(kaar); appendableString = appendableString + kaarStr;
} }
} else if (appendableString.length() > 0 && !vowelsAndHasants.containsKey(m.group(0))) { } else if (appendableString.length() > 0 && !vowelsAndHasants.containsKey(m.group(0))) {
// Adding 'a' like ITRANS if no vowel is present. // Adding 'a' like ITRANS if no vowel is present.
@ -206,9 +206,9 @@ public class BengaliLanguageUtils extends LanguageUtils {
} }
String singleton = m.group(11); String singleton = m.group(11);
if (singleton != null) { if (singleton != null) {
boolean hasKeyS = letters.containsKey(singleton); String singleStr = letters.get(singleton);
if (hasKeyS) { if (singleStr != null) {
appendableString = appendableString + letters.get(singleton); appendableString = appendableString + singleStr;
} }
} }
String others = m.group(0); String others = m.group(0);