This is an automated email from the ASF dual-hosted git repository.
deepak pushed a commit to branch release22.01
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/release22.01 by this push:
new 424e5f4df5 Replaced direct null checks on username, password, and
token with UtilValidate.isEmpty() method calls for consistency.
424e5f4df5 is described below
commit 424e5f4df58ea3c5a15344e715b58ad4b7683224
Author: Deepak Dixit <[email protected]>
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 0bb861e3d4..9d6a687086 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)