mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-07-04 09:42:29 +00:00
Clarify local variable name given it was the same as a member variable.
This commit is contained in:
parent
ab065923d4
commit
c7bfeeaf58
@ -168,22 +168,22 @@ public class HttpSessionContextIntegrationFilter implements InitializingBean,
|
|||||||
if (httpSession != null) {
|
if (httpSession != null) {
|
||||||
httpSessionExistedAtStartOfRequest = true;
|
httpSessionExistedAtStartOfRequest = true;
|
||||||
|
|
||||||
Object contextObject = httpSession.getAttribute(ACEGI_SECURITY_CONTEXT_KEY);
|
Object contextFromSessionObject = httpSession.getAttribute(ACEGI_SECURITY_CONTEXT_KEY);
|
||||||
|
|
||||||
if (contextObject != null) {
|
if (contextFromSessionObject != null) {
|
||||||
if (contextObject instanceof SecurityContext) {
|
if (contextFromSessionObject instanceof SecurityContext) {
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isDebugEnabled()) {
|
||||||
logger.debug(
|
logger.debug(
|
||||||
"Obtained from ACEGI_SECURITY_CONTEXT a valid SecurityContext and set to SecurityContextHolder: '"
|
"Obtained from ACEGI_SECURITY_CONTEXT a valid SecurityContext and set to SecurityContextHolder: '"
|
||||||
+ contextObject + "'");
|
+ contextFromSessionObject + "'");
|
||||||
}
|
}
|
||||||
|
|
||||||
SecurityContextHolder.setContext((SecurityContext) contextObject);
|
SecurityContextHolder.setContext((SecurityContext) contextFromSessionObject);
|
||||||
} else {
|
} else {
|
||||||
if (logger.isWarnEnabled()) {
|
if (logger.isWarnEnabled()) {
|
||||||
logger.warn(
|
logger.warn(
|
||||||
"ACEGI_SECURITY_CONTEXT did not contain a SecurityContext but contained: '"
|
"ACEGI_SECURITY_CONTEXT did not contain a SecurityContext but contained: '"
|
||||||
+ contextObject
|
+ contextFromSessionObject
|
||||||
+ "'; are you improperly modifying the HttpSession directly (you should always use SecurityContextHolder) or using the HttpSession attribute reserved for this class? - new SecurityContext instance associated with SecurityContextHolder");
|
+ "'; are you improperly modifying the HttpSession directly (you should always use SecurityContextHolder) or using the HttpSession attribute reserved for this class? - new SecurityContext instance associated with SecurityContextHolder");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user