]> source.dussan.org Git - vaadin-framework.git/commitdiff
Ensure the ThreadLocal request is cleared even if an exception is thrown
authorLeif Åstrand <leif@vaadin.com>
Fri, 6 Jan 2012 10:22:06 +0000 (12:22 +0200)
committerLeif Åstrand <leif@vaadin.com>
Fri, 6 Jan 2012 10:22:06 +0000 (12:22 +0200)
src/com/vaadin/terminal/gwt/server/ApplicationRunnerServlet.java

index e41ea2a9806634711204da24d565eef2b37698f0..1fa569fa853804147b5c42acd00a3ee437796c77 100644 (file)
@@ -62,8 +62,11 @@ public class ApplicationRunnerServlet extends AbstractApplicationServlet {
     protected void service(HttpServletRequest request,
             HttpServletResponse response) throws ServletException, IOException {
         this.request.set(request);
-        super.service(request, response);
-        this.request.set(null);
+        try {
+            super.service(request, response);
+        } finally {
+            this.request.set(null);
+        }
     }
 
     @Override