From f598974fa279d0e4e5cfc5a71a767c29f09d7d6c Mon Sep 17 00:00:00 2001 From: Jim Anderson Date: Fri, 15 Dec 2023 10:21:34 -0600 Subject: [PATCH] small refactor to checkSessionState to get more codecov info --- src/main/java/com/auth0/RandomStorage.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/auth0/RandomStorage.java b/src/main/java/com/auth0/RandomStorage.java index 66659a0..1d5017d 100644 --- a/src/main/java/com/auth0/RandomStorage.java +++ b/src/main/java/com/auth0/RandomStorage.java @@ -15,7 +15,11 @@ class RandomStorage extends SessionUtils { */ static boolean checkSessionState(HttpServletRequest req, String state) { String currentState = (String) remove(req, StorageUtils.STATE_KEY); - return (currentState == null && state == null) || currentState != null && currentState.equals(state); + if (currentState == null && state == null) { + return true; + } else { + return (currentState != null && currentState.equals(state)); + } } /**