aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/ui/UI.java
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2013-09-23 15:15:02 +0300
committerLeif Åstrand <leif@vaadin.com>2013-09-23 15:15:02 +0300
commite577bf9f0c99f340ef5d05e60f01f1378b68d097 (patch)
tree66e36de4d64184edbfca11c602839061ebe5b684 /server/src/com/vaadin/ui/UI.java
parent0f7bcffdb9f753148d1027ff380c9520bb78bfd8 (diff)
parentc7aaa0413f63d938791e760b23fb3f609f285aa0 (diff)
downloadvaadin-framework-e577bf9f0c99f340ef5d05e60f01f1378b68d097.tar.gz
vaadin-framework-e577bf9f0c99f340ef5d05e60f01f1378b68d097.zip
Merge changes from origin/7.1
0e048a5 Clarified error message (#12583) d0af7d1 Add async-supported to all servlets to enable push testing (#12573) 1de4389 Use JUnit 4.11 in all modules (#12572) d6954f8 Include TestBench 3.1.1 in the project (#12572) cdb9a49 Enable native scrolling in all iOS versions newer than 5, not just iOS 6 (#12324) 0e2780a Ensure string converter is always set cf796e2 Add v-iosN classname for all iOS versions instead of just N=6 (#12324) 46ac1e6 Update release notes to more closely be like 7.0.x (#12544) d9f204f PostLayoutListener javadocs (#12562) c7aaa04 Don't try to cast a connector to Widget. Fixes #12619 Change-Id: Icff34ba20a330e633c1b29ca8fd77d84b79841f5
Diffstat (limited to 'server/src/com/vaadin/ui/UI.java')
-rw-r--r--server/src/com/vaadin/ui/UI.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/server/src/com/vaadin/ui/UI.java b/server/src/com/vaadin/ui/UI.java
index 8beebb0f1e..c367d7e9d2 100644
--- a/server/src/com/vaadin/ui/UI.java
+++ b/server/src/com/vaadin/ui/UI.java
@@ -405,9 +405,12 @@ public abstract class UI extends AbstractSingleComponentContainer implements
* @see #getSession()
*/
public void setSession(VaadinSession session) {
- if ((session == null) == (this.session == null)) {
+ if (session == null && this.session == null) {
throw new IllegalStateException(
- "VaadinServiceSession has already been set. Old session: "
+ "Session should never be set to null when UI.session is already null");
+ } else if (session != null && this.session != null) {
+ throw new IllegalStateException(
+ "Session has already been set. Old session: "
+ getSessionDetails(this.session)
+ ". New session: " + getSessionDetails(session)
+ ".");