From: Leif Åstrand Date: Fri, 6 Jan 2012 10:22:06 +0000 (+0200) Subject: Ensure the ThreadLocal request is cleared even if an exception is thrown X-Git-Tag: 7.0.0.alpha2~541^2~4 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=40ce672aa404564acd812287ef56786326a7c4ca;p=vaadin-framework.git Ensure the ThreadLocal request is cleared even if an exception is thrown --- diff --git a/src/com/vaadin/terminal/gwt/server/ApplicationRunnerServlet.java b/src/com/vaadin/terminal/gwt/server/ApplicationRunnerServlet.java index e41ea2a980..1fa569fa85 100644 --- a/src/com/vaadin/terminal/gwt/server/ApplicationRunnerServlet.java +++ b/src/com/vaadin/terminal/gwt/server/ApplicationRunnerServlet.java @@ -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