1
0
mirror of synced 2026-07-19 09:35:12 +00:00

Add guard around logger.debug statement

The log message involves string concatenation, the cost of which
should only be incurred if debug logging is enabled

Issue gh-9648
This commit is contained in:
Craig Andrews
2021-04-16 11:59:01 -04:00
committed by Josh Cummings
parent 6c5e92fb0b
commit a85ce9c91f
@@ -46,8 +46,10 @@ public final class SimpleRedirectInvalidSessionStrategy implements InvalidSessio
public void onInvalidSessionDetected(HttpServletRequest request,
HttpServletResponse response) throws IOException {
logger.debug("Starting new session (if required) and redirecting to '"
+ destinationUrl + "'");
if (logger.isDebugEnabled()) {
logger.debug("Starting new session (if required) and redirecting to '"
+ destinationUrl + "'");
}
if (createNewSession) {
request.getSession();
}