Skip to content

Commit 212fd5f

Browse files
committed
Replaced direct null checks on username, password, and token with UtilValidate.isEmpty() method calls for consistency.
1 parent fb51a0e commit 212fd5f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/LoginWorker.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,9 @@ public static String checkLogin(HttpServletRequest request, HttpServletResponse
333333
password = request.getParameter("PASSWORD");
334334
token = request.getParameter("TOKEN");
335335
// check session attributes
336-
if (username == null) username = (String) session.getAttribute("USERNAME");
337-
if (password == null) password = (String) session.getAttribute("PASSWORD");
338-
if (token == null) token = (String) session.getAttribute("TOKEN");
336+
if (UtilValidate.isEmpty(username)) username = (String) session.getAttribute("USERNAME");
337+
if (UtilValidate.isEmpty(password)) password = (String) session.getAttribute("PASSWORD");
338+
if (UtilValidate.isEmpty(token)) token = (String) session.getAttribute("TOKEN");
339339

340340
// in this condition log them in if not already; if not logged in or can't log in, save parameters and return error
341341
if (UtilValidate.isEmpty(username)

0 commit comments

Comments
 (0)