diff options
author | Johannes Dahlström <johannesd@vaadin.com> | 2013-06-18 18:54:31 +0300 |
---|---|---|
committer | Johannes Dahlström <johannesd@vaadin.com> | 2013-06-19 14:10:24 +0300 |
commit | e6cfd3ae001bc870a1480ef9e9c729e1b11fe5ef (patch) | |
tree | d771f4fd1e45482227f1ed77809804600fe4787f | |
parent | 786b396ed0d1a93062247234b9021911d984192c (diff) | |
download | vaadin-framework-e6cfd3ae001bc870a1480ef9e9c729e1b11fe5ef.tar.gz vaadin-framework-e6cfd3ae001bc870a1480ef9e9c729e1b11fe5ef.zip |
Reinitialize pendingAccessQueue after deserialization (#12097)
Change-Id: I5e6d192093f19df1a07e95dff643babd6f532426
-rw-r--r-- | server/src/com/vaadin/server/VaadinSession.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/server/src/com/vaadin/server/VaadinSession.java b/server/src/com/vaadin/server/VaadinSession.java index 82f245594f..504788d479 100644 --- a/server/src/com/vaadin/server/VaadinSession.java +++ b/server/src/com/vaadin/server/VaadinSession.java @@ -203,7 +203,7 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { * session is serialized as long as it doesn't happen while some other * thread has the lock. */ - private transient final ConcurrentLinkedQueue<FutureAccess> pendingAccessQueue = new ConcurrentLinkedQueue<FutureAccess>(); + private transient ConcurrentLinkedQueue<FutureAccess> pendingAccessQueue; /** * Create a new service session tied to a Vaadin service @@ -1250,6 +1250,11 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable { * @return the pending access queue */ public Queue<FutureAccess> getPendingAccessQueue() { + if (pendingAccessQueue == null) { + // pendingAccessQueue is transient, so will be null after + // deserialization + pendingAccessQueue = new ConcurrentLinkedQueue<FutureAccess>(); + } return pendingAccessQueue; } |