]> source.dussan.org Git - vaadin-framework.git/commitdiff
Ensure VaadinSession.service is set up by storeInSession (#12204)
authorLeif Åstrand <leif@vaadin.com>
Fri, 12 Jul 2013 06:59:25 +0000 (09:59 +0300)
committerLeif Åstrand <leif@vaadin.com>
Fri, 12 Jul 2013 08:08:52 +0000 (08:08 +0000)
Change-Id: Ie707442f2625f3c9c07c75924c99299f07a4f3ec

server/src/com/vaadin/server/VaadinSession.java

index 9dedddcc2c9c06d2e6dbe90d9537a6732a754b7d..890b2eba29c31fc72ba9d589ccca7c7184e7ba56 100644 (file)
@@ -426,6 +426,13 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable {
     public void storeInSession(VaadinService service, WrappedSession session) {
         assert hasLock(service, session);
         session.setAttribute(getSessionAttributeName(service), this);
+
+        /*
+         * GAEVaadinServlet passes newly deserialized sessions here, which means
+         * that these transient fields need to be populated to avoid NPE from
+         * refreshLock().
+         */
+        this.service = service;
         this.session = session;
         refreshLock();
     }