mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-05-31 17:22:13 +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
This commit is contained in:
parent
a31a855146
commit
7dc4de05b1
@ -52,7 +52,9 @@ public final class SimpleRedirectInvalidSessionStrategy implements InvalidSessio
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onInvalidSessionDetected(HttpServletRequest request, HttpServletResponse response) throws IOException {
|
public void onInvalidSessionDetected(HttpServletRequest request, HttpServletResponse response) throws IOException {
|
||||||
this.logger.debug("Starting new session (if required) and redirecting to '" + this.destinationUrl + "'");
|
if (this.logger.isDebugEnabled()) {
|
||||||
|
this.logger.debug("Starting new session (if required) and redirecting to '" + this.destinationUrl + "'");
|
||||||
|
}
|
||||||
if (this.createNewSession) {
|
if (this.createNewSession) {
|
||||||
request.getSession();
|
request.getSession();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user