diff options
author | Johannes Dahlström <johannesd@vaadin.com> | 2013-06-18 18:54:31 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2013-06-18 18:16:59 +0000 |
commit | b637ab5945ef0340ce33dda7703e67181c879e4c (patch) | |
tree | 8ce90ac6c5f6daef80084f9e420977e719a97690 /server | |
parent | 47c199f6fabe17a39c5a97b196f2e347e0eeada6 (diff) | |
download | vaadin-framework-b637ab5945ef0340ce33dda7703e67181c879e4c.tar.gz vaadin-framework-b637ab5945ef0340ce33dda7703e67181c879e4c.zip |
Reinitialize pendingAccessQueue after deserialization (#12097)
Change-Id: I5e6d192093f19df1a07e95dff643babd6f532426
Diffstat (limited to 'server')
-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; } |