Note that this is a runtime (unchecked) exception. Security exceptions are usually fatal; there is no reason for them to be checked.
5354555657585960616263
Throwable t = e.getRootCause(); if (t instanceof JellyTagException) { JellyTagException jte = (JellyTagException) t; Throwable cause = jte.getCause(); if (cause instanceof AcegiSecurityException) { AcegiSecurityException se = (AcegiSecurityException) cause; throw new ServletException(se); } } throw e; }
19481949195019511952195319541955
filter.reset(securityRealm); LOGGER.fine("Security is now fully set up"); } } catch (ServletException e) { // for binary compatibility, this method cannot throw a checked exception throw new AcegiSecurityException("Failed to configure filter",e) {}; } }
121122123124125126127128129130131
//-- Filter --// public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { chain.doFilter(request, response); final AcegiSecurityException exception = (AcegiSecurityException) request.getAttribute(EXCEPTION); if ( exception != null) { request.removeAttribute(EXCEPTION); throw exception; }
226227228229230231232233234235236
publishSuccessEvent(result); //we're done, return the token. return result; } catch (LoginException loginException) { AcegiSecurityException ase = loginExceptionResolver.resolveException(loginException); publishFailureEvent(request, ase); throw ase; } }
390391392393394395396397398399400
publishSuccessEvent(result); //we're done, return the token. return result; } catch (LoginException loginException) { AcegiSecurityException ase = loginExceptionResolver .resolveException(loginException); publishFailureEvent(request, ase); throw ase; }
199019911992199319941995199619971998
filter.reset(securityRealm); LOGGER.fine("Security is now fully set up"); } } catch (ServletException e) { // for binary compatibility, this method cannot throw a checked exception throw new AcegiSecurityException("Failed to configure filter", e) { }; } }