Fix #720 - Concurrency error in GT_LanguageManager.addStringLocalization

This commit is contained in:
David Vierra 2016-12-31 03:32:11 -10:00
parent 7a8067868d
commit 50b9fc9238

View file

@ -22,7 +22,7 @@ public class GT_LanguageManager {
return addStringLocalization(aKey, aEnglish, true); return addStringLocalization(aKey, aEnglish, true);
} }
public static String addStringLocalization(String aKey, String aEnglish, boolean aWriteIntoLangFile) { public static synchronized String addStringLocalization(String aKey, String aEnglish, boolean aWriteIntoLangFile) {
if (aKey == null) return E; if (aKey == null) return E;
if (aWriteIntoLangFile){ aEnglish = writeToLangFile(aKey, aEnglish); if (aWriteIntoLangFile){ aEnglish = writeToLangFile(aKey, aEnglish);
if(!LANGMAP.containsKey(aKey)){ if(!LANGMAP.containsKey(aKey)){