From: Roland Haeder Date: Sun, 17 Apr 2016 16:45:29 +0000 (+0200) Subject: Prevent NPE X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=73e00b3c79c25aef4a98596519bd838e58e06c0e;p=jfinancials-war.git Prevent NPE --- diff --git a/src/java/org/mxchange/addressbook/beans/localization/AddressbookLocalizationSessionBean.java b/src/java/org/mxchange/addressbook/beans/localization/AddressbookLocalizationSessionBean.java index aed99966..9bf7f1b3 100644 --- a/src/java/org/mxchange/addressbook/beans/localization/AddressbookLocalizationSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/localization/AddressbookLocalizationSessionBean.java @@ -56,6 +56,12 @@ public class AddressbookLocalizationSessionBean extends BaseDatabaseBean impleme // Log trace message //this.getLoggerBeanLocal().logTrace(MessageFormat.format("AddressbookLocalizationSessionBean::setLanguage: language={0} - CALLED!", language)); //NOI18N + // Is the language null? + if (null == language) { + // This may sometimes happen, so abort here + return; + } + // Language splits String[] splits = language.split("_"); //NOI18N if (null == splits[1]) {