From 8e1e83dd1e2a34024bca5044786b81ba714abcf1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 8 Jul 2017 00:49:34 +0200 Subject: [PATCH] Please cherry-pick: - "cached" beanHelper.contact locally so such "expensive" calls are reduced - and the instance has not changed between two calls anyway MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../jjobs/beans/user/JobsAdminUserWebRequestBean.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java b/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java index 28bcde2c..b13849c1 100644 --- a/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java +++ b/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java @@ -227,7 +227,7 @@ public class JobsAdminUserWebRequestBean extends BaseJobsController implements J } else if (this.adminContactController.getFamilyName() == null) { // ... and again throw new NullPointerException("contactController.familyName is null"); //NOI18N - } else if (this.contactController.getFamilyName().isEmpty()) { + } else if (this.adminContactController.getFamilyName().isEmpty()) { // ... and again throw new IllegalArgumentException("contactController.familyName is empty"); //NOI18N } else if (this.adminContactController.getEmailAddress() == null) { @@ -241,13 +241,15 @@ public class JobsAdminUserWebRequestBean extends BaseJobsController implements J // Create new user instance User user = new LoginUser(); - // Set user name, CONFIRMED and INVISIBLE user.setUserName(this.getUserName()); user.setUserMustChangePassword(this.getUserMustChangePassword()); user.setUserAccountStatus(UserAccountStatus.CONFIRMED); user.setUserProfileMode(ProfileMode.INVISIBLE); + // Copy user locale + user.setUserLocale(this.localizationController.getLocale()); + // Init instance Contact userContact; -- 2.39.5