Skip to content

Commit

Permalink
Merge pull request #1241 from lprimak/remove-jetty-workaround
Browse files Browse the repository at this point in the history
Jakarta EE: Remove jetty workaround
  • Loading branch information
lprimak authored Dec 20, 2023
2 parents fc3bc58 + de4dfde commit 6ecb862
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ static int getCookieAge(ServletRequest request, org.apache.shiro.mgt.SecurityMan
} else {
try {
return (int) Duration.ofMinutes(request.getServletContext().getSessionTimeout()).toSeconds();
} catch (Throwable e) {
// workaround for https://github.com/eclipse/jetty.project/issues/8556
} catch (NoSuchMethodError noSuchMethodError) {
// Older servers (e.g. Jetty 9.x) do not support getSessionTimeout() at all
log.debug("ServletContext.getSessionTimeout() not supported", noSuchMethodError);
return (int) Duration.ofHours(1).toSeconds();
}
}
Expand Down

0 comments on commit 6ecb862

Please sign in to comment.