From 4c896110a2df1e68dc9d0c56793ee5d0929ec310 Mon Sep 17 00:00:00 2001 From: Jim Anderson Date: Fri, 15 Dec 2023 10:48:03 -0600 Subject: [PATCH] revert RandomStorage checkSessionState changes to original (changes made to inspect coverage warnings) --- src/main/java/com/auth0/RandomStorage.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main/java/com/auth0/RandomStorage.java b/src/main/java/com/auth0/RandomStorage.java index f9510bb..66659a0 100644 --- a/src/main/java/com/auth0/RandomStorage.java +++ b/src/main/java/com/auth0/RandomStorage.java @@ -15,11 +15,7 @@ class RandomStorage extends SessionUtils { */ static boolean checkSessionState(HttpServletRequest req, String state) { String currentState = (String) remove(req, StorageUtils.STATE_KEY); - if (currentState == null) { - return state == null; - } else { - return currentState.equals(state); - } + return (currentState == null && state == null) || currentState != null && currentState.equals(state); } /**