diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/ivy.xml | 2 | ||||
-rw-r--r-- | server/src/com/vaadin/ui/UI.java | 7 | ||||
-rw-r--r-- | server/tests/src/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversions.java | 1 |
3 files changed, 7 insertions, 3 deletions
diff --git a/server/ivy.xml b/server/ivy.xml index b78541c52f..ba859b08ee 100644 --- a/server/ivy.xml +++ b/server/ivy.xml @@ -58,7 +58,7 @@ <!-- TESTING DEPENDENCIES --> <!-- Test frameworks & related --> - <dependency org="junit" name="junit" rev="4.5" + <dependency org="junit" name="junit" rev="4.11" conf="test,ide -> default" /> <dependency org="org.easymock" name="easymock" rev="3.0" conf="test,ide-> default" transitive="true" /> 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) + "."); diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversions.java b/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversions.java index dd46b11520..85116dd152 100644 --- a/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversions.java +++ b/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversions.java @@ -250,6 +250,7 @@ public class AbsFieldValueConversions extends TestCase { @Test public void testNullConverter() { TextField tf = new TextField("foo"); + tf.setConverter(new StringToIntegerConverter()); tf.setPropertyDataSource(new ObjectProperty<Integer>(12)); tf.setConverter((Converter) null); try { |