Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public class AccessControlListTag extends TagSupport {

// ~ Methods
// ========================================================================================================

@Override
public int doStartTag() throws JspException {
if ((null == hasPermission) || "".equals(hasPermission)) {
return skipBody();
Expand Down Expand Up @@ -116,6 +116,7 @@ private List<Object> parseHasPermission(String hasPermission) {
parsedPermission = Integer.parseInt(permissionToParse);
}
catch (NumberFormatException notBitMask) {
logger.error("Failed to parse permissions.", notBitMask);
}
parsedPermissions.add(parsedPermission);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,33 +44,6 @@ public abstract class SecurityWebApplicationContextUtils extends WebApplicationC
* @throws IllegalStateException if no WebApplicationContext can be found
*/
public static WebApplicationContext findRequiredWebApplicationContext(ServletContext servletContext) {
WebApplicationContext wac = _findWebApplicationContext(servletContext);
if (wac == null) {
throw new IllegalStateException("No WebApplicationContext found: no ContextLoaderListener registered?");
}
return wac;
}

/**
* Copy of {@link #findWebApplicationContext(ServletContext)} for compatibility with spring framework 4.1.x.
* @see #findWebApplicationContext(ServletContext)
*/
private static WebApplicationContext _findWebApplicationContext(ServletContext sc) {
WebApplicationContext wac = getWebApplicationContext(sc);
if (wac == null) {
Enumeration<String> attrNames = sc.getAttributeNames();
while (attrNames.hasMoreElements()) {
String attrName = attrNames.nextElement();
Object attrValue = sc.getAttribute(attrName);
if (attrValue instanceof WebApplicationContext) {
if (wac != null) {
throw new IllegalStateException("No unique WebApplicationContext found: more than one " +
"DispatcherServlet registered with publishContext=true?");
}
wac = (WebApplicationContext) attrValue;
}
}
}
return wac;
return WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ ApplicationContext getContext(ServletContext servletContext) {
*
* @param event HttpSessionEvent passed in by the container
*/
@Override
public void sessionCreated(HttpSessionEvent event) {
HttpSessionCreatedEvent e = new HttpSessionCreatedEvent(event.getSession());
Log log = LogFactory.getLog(LOGGER_NAME);
Expand All @@ -80,6 +81,7 @@ public void sessionCreated(HttpSessionEvent event) {
*
* @param event The HttpSessionEvent pass in by the container
*/
@Override
public void sessionDestroyed(HttpSessionEvent event) {
HttpSessionDestroyedEvent e = new HttpSessionDestroyedEvent(event.getSession());
Log log = LogFactory.getLog(LOGGER_NAME);
Expand Down