Fix null check for I18n error logging

This commit is contained in:
Daniel Fiala 2023-08-08 01:40:36 +02:00 committed by GitHub
parent 2b993d58cf
commit 6fb500d9fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ public class I18n implements net.ess3.api.II18n {
return localeBundle.getString(string);
}
} catch (final MissingResourceException ex) {
if (ess == null || ess.getSettings().isDebug()) {
if (ess != null && ess.getSettings().isDebug()) {
ess.getLogger().log(Level.WARNING, String.format("Missing translation key \"%s\" in translation file %s", ex.getKey(), localeBundle.getLocale().toString()), ex);
}
return defaultBundle.getString(string);