diff options
author | Leif Åstrand <leif@vaadin.com> | 2012-05-07 13:16:13 +0000 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2012-05-07 13:16:13 +0000 |
commit | a810ce9ce0bafce6d9b437582e706175f4c8827a (patch) | |
tree | 1988c5dc7e677eed0781579f588c1da79d121d29 /src/com/vaadin | |
parent | 03b6110d94b65d0767d1519fac572630538cf314 (diff) | |
download | vaadin-framework-a810ce9ce0bafce6d9b437582e706175f4c8827a.tar.gz vaadin-framework-a810ce9ce0bafce6d9b437582e706175f4c8827a.zip |
Don't assume there's always an application (#8694)
svn changeset:23684/svn branch:6.8
Diffstat (limited to 'src/com/vaadin')
-rw-r--r-- | src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java | 8 | ||||
-rw-r--r-- | src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java | 7 |
2 files changed, 9 insertions, 6 deletions
diff --git a/src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java b/src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java index 1741ec5e7f..2ac574c2de 100644 --- a/src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java +++ b/src/com/vaadin/terminal/gwt/server/AbstractApplicationPortlet.java @@ -495,9 +495,11 @@ public abstract class AbstractApplicationPortlet extends GenericPortlet } } finally { - requestTimer - .stop((AbstractWebApplicationContext) application - .getContext()); + PortletSession session = request + .getPortletSession(false); + if (session != null) { + requestTimer.stop(getApplicationContext(session)); + } } } } diff --git a/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java b/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java index d42b2142fe..68089e18e0 100644 --- a/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java +++ b/src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java @@ -552,9 +552,10 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements .onRequestEnd(request, response); } } finally { - requestTimer - .stop((AbstractWebApplicationContext) application - .getContext()); + HttpSession session = request.getSession(false); + if (session != null) { + requestTimer.stop(getApplicationContext(session)); + } } } |