summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorBuild Agent <build@vaadin.com>2014-03-11 21:19:23 +0200
committerBuild Agent <build@vaadin.com>2014-03-11 21:19:24 +0200
commit4517428d71abadb8cb68de4709f831271f742f28 (patch)
tree712b82222d8c9eb2bf61f474f9d236fa19d5c831 /server
parent35c270eb5de2c1a30efd7790371bbae30e9f1acb (diff)
parent71e8c7efa9cef900b3307aab0d0fd4d9470810a2 (diff)
downloadvaadin-framework-4517428d71abadb8cb68de4709f831271f742f28.tar.gz
vaadin-framework-4517428d71abadb8cb68de4709f831271f742f28.zip
Merge changes from origin/7.1
7d74479 Revert "Fixes a memory leak on IE8 in LayoutManagerIE8 (#12688)" c121c4e Do not fail assertion if re-setting the same lock (#13440) c0e408c Added nojavadoc parameter to "all" build script. 0417c06 Fixed nojavadoc parameter on "all" build. 71e8c7e Make ExcludeFromSuite annotation Runtime and Inherited Change-Id: I5395660758e9bc665aaf6eb82ea27d478fa6dfbb
Diffstat (limited to 'server')
-rw-r--r--server/src/com/vaadin/server/VaadinService.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/server/src/com/vaadin/server/VaadinService.java b/server/src/com/vaadin/server/VaadinService.java
index b332e6a2e8..c926efc67c 100644
--- a/server/src/com/vaadin/server/VaadinService.java
+++ b/server/src/com/vaadin/server/VaadinService.java
@@ -527,8 +527,13 @@ public abstract class VaadinService implements Serializable {
* The lock object
*/
private void setSessionLock(WrappedSession wrappedSession, Lock lock) {
- assert wrappedSession != null : "Can't set a lock for a null session";
- assert wrappedSession.getAttribute(getLockAttributeName()) == null : "Changing the lock for a session is not allowed";
+ if (wrappedSession == null) {
+ throw new IllegalArgumentException(
+ "Can't set a lock for a null session");
+ }
+ Object currentSessionLock = wrappedSession
+ .getAttribute(getLockAttributeName());
+ assert (currentSessionLock == null || currentSessionLock == lock) : "Changing the lock for a session is not allowed";
wrappedSession.setAttribute(getLockAttributeName(), lock);
}