Skip to content

Commit

Permalink
Replaced direct null checks on username, password, and token with Uti…
Browse files Browse the repository at this point in the history
…lValidate.isEmpty() method calls for consistency.
  • Loading branch information
dixitdeepak committed Dec 14, 2023
1 parent fb51a0e commit 212fd5f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,9 @@ public static String checkLogin(HttpServletRequest request, HttpServletResponse
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)
Expand Down

0 comments on commit 212fd5f

Please sign in to comment.