This is an automated email from the ASF dual-hosted git repository. deepak pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/trunk by this push: new 212fd5f4a1 Replaced direct null checks on username, password, and token with UtilValidate.isEmpty() method calls for consistency. 212fd5f4a1 is described below commit 212fd5f4a1cc49495ce9c66ff96cf9a08326d547 Author: Deepak Dixit <dee...@apache.org> AuthorDate: Thu Dec 14 18:20:33 2023 +0530 Replaced direct null checks on username, password, and token with UtilValidate.isEmpty() method calls for consistency. --- .../src/main/java/org/apache/ofbiz/webapp/control/LoginWorker.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/LoginWorker.java b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/LoginWorker.java index 322448a3c1..acaea1582a 100644 --- a/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/LoginWorker.java +++ b/framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/LoginWorker.java @@ -333,9 +333,9 @@ public final class LoginWorker { password = request.getParameter("PASSWORD"); token = request.getParameter("TOKEN"); // check session attributes - if (username == null) username = (String) session.getAttribute("USERNAME"); - if (password == null) password = (String) session.getAttribute("PASSWORD"); - if (token == null) token = (String) session.getAttribute("TOKEN"); + if (UtilValidate.isEmpty(username)) username = (String) session.getAttribute("USERNAME"); + if (UtilValidate.isEmpty(password)) password = (String) session.getAttribute("PASSWORD"); + if (UtilValidate.isEmpty(token)) token = (String) session.getAttribute("TOKEN"); // in this condition log them in if not already; if not logged in or can't log in, save parameters and return error if (UtilValidate.isEmpty(username)