aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/src/main/java/com/vaadin/server/VaadinSession.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/server/src/main/java/com/vaadin/server/VaadinSession.java b/server/src/main/java/com/vaadin/server/VaadinSession.java
index 6bf3a41bd7..a96d09cab6 100644
--- a/server/src/main/java/com/vaadin/server/VaadinSession.java
+++ b/server/src/main/java/com/vaadin/server/VaadinSession.java
@@ -890,8 +890,10 @@ public class VaadinSession implements HttpSessionBindingListener, Serializable {
* the UI to remove
*/
public void removeUI(UI ui) {
- assert hasLock();
- assert UI.getCurrent() == ui;
+ assert hasLock() : "Session is locked";
+ assert UI.getCurrent() != null : "Current UI cannot be null";
+ assert ui != null : "Removed UI cannot be null";
+ assert UI.getCurrent().getUIId() == ui.getUIId() : "UIs don't match";
Integer id = Integer.valueOf(ui.getUIId());
ui.setSession(null);
uIs.remove(id);