if (context.getCurrentUser() == null) { Authenticate.startAuthentication(context, request, response); } else
if (context.getCurrentUser() != null || Authenticate.startAuthentication(context, request, response))
    private void processRequest(HttpServletRequest request,            HttpServletResponse response) throws ServletException, IOException    {        Context context = null;        // set all incoming encoding to UTF-8        request.setCharacterEncoding("UTF-8");        // Get the URL from the request immediately, since forwarding        // loses that information        UIUtil.storeOriginalURL(request);        try        {            // Obtain a context - either create one, or get the one created by            // an authentication filter            context = UIUtil.obtainContext(request);            // Are we resuming a previous request that was interrupted for            // authentication?            request = Authenticate.getRealRequest(request);            if (log.isDebugEnabled())            {                log.debug(LogManager.getHeader(context, "http_request", UIUtil                        .getRequestLogInfo(request)));            }            // Invoke the servlet code            if (request.getMethod().equals("POST"))            {                doDSPost(context, request, response);            }            else            {                doDSGet(context, request, response);            }        }        catch (SQLException se)        {            // For database errors, we log the exception and show a suitably            // apologetic error            log.warn(LogManager.getHeader(context, "database_error", se                    .toString()), se);            // Also email an alert            UIUtil.sendAlert(request, se);            JSPManager.showInternalError(request, response);        }        catch (AuthorizeException ae)        {            /*             * If no user is logged in, we will start authentication, since if             * they authenticate, they might be allowed to do what they tried to             * do. If someone IS logged in, and we got this exception, we know             * they tried to do something they aren't allowed to, so we display             * an error in that case.             */            if (context.getCurrentUser() == null)            {                Authenticate.startAuthentication(context, request, response);            }            else            {                // FIXME: Log the right info?                // Log the error                log.info(LogManager.getHeader(context, "authorize_error", ae                        .toString()));                JSPManager.showAuthorizeError(request, response, ae);            }        }        catch (RuntimeException e)        {            // Catch and re-throw to ensure context aborted (via "finally")            throw e;        }        catch (IOException ioe)        {            // Catch and re-throw to ensure context aborted (via "finally")            throw ioe;        }        catch (ServletException sve)        {            // Catch and re-throw to ensure context aborted (via "finally")            throw sve;        }        finally        {            // Abort the context if it's still valid            if ((context != null) && context.isValid())            {                context.abort();            }        }    }