From: Roland Häder Date: Fri, 23 Jun 2017 22:32:53 +0000 (+0200) Subject: Please cherry-pick: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=fc7edb4efb51f83d526aea61457905d7b17abc71;p=addressbook-core.git Please cherry-pick: - the user's locale must be set at all times, else the delivering method (onMessage()) will fail with an NPE because the locale is really required there to choose localized templates. Signed-off-by: Roland Häder --- diff --git a/src/org/mxchange/addressbook/database/BaseAddressbookDatabaseBean.java b/src/org/mxchange/addressbook/database/BaseAddressbookDatabaseBean.java index 1664575..720daa9 100644 --- a/src/org/mxchange/addressbook/database/BaseAddressbookDatabaseBean.java +++ b/src/org/mxchange/addressbook/database/BaseAddressbookDatabaseBean.java @@ -491,6 +491,9 @@ public abstract class BaseAddressbookDatabaseBean extends BaseDatabaseBean { } else if (user.getUserContact().getContactPersonalTitle() == null) { // Throw NPE again throw new NullPointerException("user.userContact.contactPersonalTitle is null"); //NOI18N + } else if (user.getUserLocale() == null) { + // Throw NPE again + throw new NullPointerException("user.userLocale is null"); //NOI18N } // Prepare mail wrapper