From 2e2d8e6d1428307bc0ecc7ceb19727d724430b40 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 25 Sep 2022 11:13:21 +0200 Subject: [PATCH] Please cherry-pick: - Variable 'password' can be final and no need for NULL, maybe an old leftover? --- .../beans/user/FinancialsAdminUserWebRequestBean.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) 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 -- 2.39.5