Why did you get the RequestAttributes? of the last request in FrameworkServlet.processRequest ()?

Why should first get the LocaleContext and RequestAttributes, of the last request saved in the processRequest method of FrameworkServlet in

springmvc and finally restore LocaleContext and RequestAttributes in finally ? What"s the point of doing this?

attach source code and doubt notes:

//org.springframework.web.servlet.FrameworkServlet-sharpprocessRequest

protected final void processRequest(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {

        long startTime = System.currentTimeMillis();
        Throwable failureCause = null;


        //LocaleContext
        LocaleContext previousLocaleContext = LocaleContextHolder.getLocaleContext();
        //LocaleContext
        LocaleContext localeContext = buildLocaleContext(request);
        //RequestAttributes
        RequestAttributes previousAttributes = RequestContextHolder.getRequestAttributes();
        //RequestAttributes
        ServletRequestAttributes requestAttributes = buildRequestAttributes(request, response, previousAttributes);



        WebAsyncManager asyncManager = WebAsyncUtils.getAsyncManager(request);
        asyncManager.registerCallableInterceptor(FrameworkServlet.class.getName(), new RequestBindingInterceptor());

        initContextHolders(request, localeContext, requestAttributes);

        try {
            doService(request, response);
        }
        catch (ServletException ex) {
            failureCause = ex;
            throw ex;
        }
        catch (IOException ex) {
            failureCause = ex;
            throw ex;
        }
        catch (Throwable ex) {
            failureCause = ex;
            throw new NestedServletException("Request processing failed", ex);
        }

        finally {
            //previousLocaleContextpreviousAttributes
            resetContextHolders(request, previousLocaleContext, previousAttributes);
            if (requestAttributes != null) {
                requestAttributes.requestCompleted();
            }

            if (logger.isDebugEnabled()) {
                if (failureCause != null) {
                    this.logger.debug("Could not complete request", failureCause);
                }
                else {
                    if (asyncManager.isConcurrentHandlingStarted()) {
                        logger.debug("Leaving response open for concurrent processing");
                    }
                    else {
                        this.logger.debug("Successfully completed request");
                    }
                }
            }

            publishRequestHandledEvent(request, response, startTime, failureCause);
        }
    }
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1c10bdf-15256.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1c10bdf-15256.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?