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=38b0c991851bd1067df10ca6a269fc87b81a8a98;p=pizzaservice-war.git Prevent NPE --- diff --git a/src/java/org/mxchange/pizzaapplication/beans/localization/PizzaLocalizationSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/localization/PizzaLocalizationSessionBean.java index b6b67c49..648cf36d 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/localization/PizzaLocalizationSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/localization/PizzaLocalizationSessionBean.java @@ -56,6 +56,12 @@ public class PizzaLocalizationSessionBean extends BaseDatabaseBean implements Pi // Log trace message //this.getLoggerBeanLocal().logTrace(MessageFormat.format("PizzaLocalizationSessionBean::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]) {