Clarify local variable name given it was the same as a member variable.

This commit is contained in:
Ben Alex 2005-07-11 01:19:41 +00:00
parent ab065923d4
commit c7bfeeaf58
1 changed files with 6 additions and 6 deletions

View File

@ -168,22 +168,22 @@ public class HttpSessionContextIntegrationFilter implements InitializingBean,
if (httpSession != null) {
httpSessionExistedAtStartOfRequest = true;
Object contextObject = httpSession.getAttribute(ACEGI_SECURITY_CONTEXT_KEY);
Object contextFromSessionObject = httpSession.getAttribute(ACEGI_SECURITY_CONTEXT_KEY);
if (contextObject != null) {
if (contextObject instanceof SecurityContext) {
if (contextFromSessionObject != null) {
if (contextFromSessionObject instanceof SecurityContext) {
if (logger.isDebugEnabled()) {
logger.debug(
"Obtained from ACEGI_SECURITY_CONTEXT a valid SecurityContext and set to SecurityContextHolder: '"
+ contextObject + "'");
+ contextFromSessionObject + "'");
}
SecurityContextHolder.setContext((SecurityContext) contextObject);
SecurityContextHolder.setContext((SecurityContext) contextFromSessionObject);
} else {
if (logger.isWarnEnabled()) {
logger.warn(
"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");
}