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=2e2d8e6d1428307bc0ecc7ceb19727d724430b40;p=jfinancials-war.git Please cherry-pick: - Variable 'password' can be final and no need for NULL, maybe an old leftover? --- diff --git a/src/java/org/mxchange/jfinancials/beans/user/FinancialsAdminUserWebRequestBean.java b/src/java/org/mxchange/jfinancials/beans/user/FinancialsAdminUserWebRequestBean.java index e5c9260e..86efca4f 100644 --- a/src/java/org/mxchange/jfinancials/beans/user/FinancialsAdminUserWebRequestBean.java +++ b/src/java/org/mxchange/jfinancials/beans/user/FinancialsAdminUserWebRequestBean.java @@ -702,10 +702,8 @@ public class FinancialsAdminUserWebRequestBean extends BaseFinancialsBean implem * @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? @@ -720,10 +718,6 @@ public class FinancialsAdminUserWebRequestBean extends BaseFinancialsBean implem 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() >= FinancialsUserWebRequestController.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