diff options
author | Leif Åstrand <leif@vaadin.com> | 2012-09-09 22:16:51 +0300 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2012-09-09 22:16:51 +0300 |
commit | 998c9c97b4b7d9531028b442df4c38a33b60e5f0 (patch) | |
tree | 9c81571efd63c3ebcf4fce03411486ac23e65041 /server/src/com/vaadin/ui/ConnectorTracker.java | |
parent | 98a934554a8a88e0b64e9bc4069ee2af82286efa (diff) | |
download | vaadin-framework-998c9c97b4b7d9531028b442df4c38a33b60e5f0.tar.gz vaadin-framework-998c9c97b4b7d9531028b442df4c38a33b60e5f0.zip |
Verify that lock is held when accessing state (#9515)
Diffstat (limited to 'server/src/com/vaadin/ui/ConnectorTracker.java')
-rw-r--r-- | server/src/com/vaadin/ui/ConnectorTracker.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/server/src/com/vaadin/ui/ConnectorTracker.java b/server/src/com/vaadin/ui/ConnectorTracker.java index d454df98ee..dbada63a47 100644 --- a/server/src/com/vaadin/ui/ConnectorTracker.java +++ b/server/src/com/vaadin/ui/ConnectorTracker.java @@ -29,6 +29,7 @@ import com.vaadin.server.AbstractClientConnector; import com.vaadin.server.AbstractCommunicationManager; import com.vaadin.server.ClientConnector; import com.vaadin.server.GlobalResourceHandler; +import com.vaadin.server.VaadinSession; /** * A class which takes care of book keeping of {@link ClientConnector}s for a @@ -286,6 +287,8 @@ public class ConnectorTracker implements Serializable { * The connector that should be marked clean. */ public void markDirty(ClientConnector connector) { + assert uI.getSession() == null + || uI.getSession().getLock().isHeldByCurrentThread() : VaadinSession.SESSION_LOCK_MESSAGE; if (isWritingResponse()) { throw new IllegalStateException( "A connector should not be marked as dirty while a response is being written."); |