From 52462f3688a588f76720bc9e4f7ff52c04c964dc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 21 Jan 2023 21:33:04 +0100 Subject: [PATCH] Continued: - moved to proper package - also check if clear-text password is empty --- .../juserlogincore/{login => utils}/UserLoginUtils.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) rename src/org/mxchange/juserlogincore/{login => utils}/UserLoginUtils.java (99%) diff --git a/src/org/mxchange/juserlogincore/login/UserLoginUtils.java b/src/org/mxchange/juserlogincore/utils/UserLoginUtils.java similarity index 99% rename from src/org/mxchange/juserlogincore/login/UserLoginUtils.java rename to src/org/mxchange/juserlogincore/utils/UserLoginUtils.java index 43505ba..1c2883f 100644 --- a/src/org/mxchange/juserlogincore/login/UserLoginUtils.java +++ b/src/org/mxchange/juserlogincore/utils/UserLoginUtils.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package org.mxchange.juserlogincore.login; +package org.mxchange.juserlogincore.utils; import java.io.Serializable; import java.security.SecureRandom; @@ -101,6 +101,9 @@ public class UserLoginUtils implements Serializable { if (null == password) { // Throw NPE throw new NullPointerException("password is null"); //NOI18N + } else if (password.isEmpty()) { + // Is empty + return 0.0f; } // Calculate it -- 2.39.5