}
private static Class<? extends ViewConfig> tryToHandleSecurityViolation(RuntimeException runtimeException,
boolean allowNavigation)
{
AccessDeniedException exception = extractException(runtimeException);
if(exception == null)
{
throw runtimeException;
}
Class<? extends ViewConfig> errorView = null;
Class<? extends ViewConfig> inlineErrorView = exception.getErrorView();
if(inlineErrorView != null && !DefaultErrorView.class.getName().equals(inlineErrorView.getName()))
{
errorView = inlineErrorView;
}