Skip to content

Commit

Permalink
small refactor to checkSessionState to get more codecov info
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmyjames committed Dec 15, 2023
1 parent 24fdb5e commit f598974
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/com/auth0/RandomStorage.java
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}

/**
Expand Down

0 comments on commit f598974

Please sign in to comment.