LocaleUtils: don't NPE if no default locale mapping exists
@@ -246,6 +246,11 @@ public class LocaleUtils {
Map<String, String> localeStrings = LocaleUtils.LOCALE_MAPPINGS.get(locale.toLowerCase());
if (localeStrings == null)
localeStrings = LocaleUtils.LOCALE_MAPPINGS.get(LanguageUtils.getDefaultLocale());
+ if (localeStrings == null) {
+ // Don't cause a NPE if the locale is STILL missing
+ GeyserConnector.getInstance().getLogger().debug("MISSING DEFAULT LOCALE: " + LanguageUtils.getDefaultLocale());
+ return messageText;
+ }
return localeStrings.getOrDefault(messageText, messageText);
}
