From 5b7ed79b6a787ca38ed1a0a8dceb836eee3a0c82 Mon Sep 17 00:00:00 2001 From: Luke Taylor Date: Tue, 28 Aug 2007 23:19:06 +0000 Subject: [PATCH] SEC-539: Reformatted "divider" comments (//~ Methods=== etc). Simplified boolean expression in afterPropertiesSet. --- .../HttpSessionContextIntegrationFilter.java | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/core/src/main/java/org/acegisecurity/context/HttpSessionContextIntegrationFilter.java b/core/src/main/java/org/acegisecurity/context/HttpSessionContextIntegrationFilter.java index 947c0d8579..8f8fba9375 100644 --- a/core/src/main/java/org/acegisecurity/context/HttpSessionContextIntegrationFilter.java +++ b/core/src/main/java/org/acegisecurity/context/HttpSessionContextIntegrationFilter.java @@ -93,12 +93,10 @@ import org.springframework.util.ReflectionUtils; * * @author Ben Alex * @author Patrick Burleson - * @version $Id: HttpSessionContextIntegrationFilter.java 1784 2007-02-24 - * 21:00:24Z luke_t $ + * @version $Id$ */ public class HttpSessionContextIntegrationFilter implements InitializingBean, Filter { - // ~ Static fields/initializers - // ===================================================================================== + //~ Static fields/initializers ===================================================================================== protected static final Log logger = LogFactory.getLog(HttpSessionContextIntegrationFilter.class); @@ -106,8 +104,7 @@ public class HttpSessionContextIntegrationFilter implements InitializingBean, Fi public static final String ACEGI_SECURITY_CONTEXT_KEY = "ACEGI_SECURITY_CONTEXT"; - // ~ Instance fields - // ================================================================================================ + //~ Instance fields ================================================================================================ private Class context = SecurityContextImpl.class; @@ -168,8 +165,7 @@ public class HttpSessionContextIntegrationFilter implements InitializingBean, Fi this.contextObject = generateNewContext(); } - // ~ Methods - // ======================================================================================================== + //~ Methods ======================================================================================================== public void afterPropertiesSet() throws Exception { if ((this.context == null) || (!SecurityContext.class.isAssignableFrom(this.context))) { @@ -178,7 +174,7 @@ public class HttpSessionContextIntegrationFilter implements InitializingBean, Fi + ")"); } - if ((forceEagerSessionCreation == true) && (allowSessionCreation == false)) { + if (forceEagerSessionCreation && !allowSessionCreation) { throw new IllegalArgumentException( "If using forceEagerSessionCreation, you must set allowSessionCreation to also be true"); }