From: Roland Häder Date: Sun, 25 Sep 2022 09:13:21 +0000 (+0200) Subject: Please cherry-pick: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=55a5cf3e45051aa7894802f39e3acf868076eb88;p=jjobs-war.git Please cherry-pick: - Variable 'password' can be final and no need for NULL, maybe an old leftover? Signed-off-by: Roland Häder --- diff --git a/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java b/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java index c83aba94..f971298b 100644 --- a/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java +++ b/src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java @@ -708,10 +708,8 @@ public class JobsAdminUserWebRequestBean extends BaseJobsBean implements JobsAdm * @return New user instance */ private User createUserInstance () { - // Init variable for password - String password = null; - - // Init instance + // Init variable for password and contact + final String password; final Contact userContact; // Is a contact instance in helper set? @@ -726,10 +724,6 @@ public class JobsAdminUserWebRequestBean extends BaseJobsBean implements JobsAdm password = this.getUserPassword(); } - // The password should not be null and at least 5 characters long - assert (password != null) : "password is null"; //NOI18N - assert (password.length() >= JobsUserWebRequestController.MINIMUM_PASSWORD_LENGTH) : "Password is not long enough."; //NOI18N - // Is contact instance given? Else create one if (this.getContact() instanceof Contact) { // Then use it for contact linking