summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2012-04-10 15:51:37 +0300
committerArtur Signell <artur@vaadin.com>2012-04-10 21:28:33 +0300
commit167c2b9619f3db37948bd857a294169151a94eb7 (patch)
tree9a93f6a666f250936e9e0bbb337abc77e2a1b66b /tests
parent66c98850bf12bc9dd6010a2db8907cb2a5ef5e85 (diff)
downloadvaadin-framework-167c2b9619f3db37948bd857a294169151a94eb7.tar.gz
vaadin-framework-167c2b9619f3db37948bd857a294169151a94eb7.zip
Provide a dummy Root to avoid NPE
Diffstat (limited to 'tests')
-rw-r--r--tests/server-side/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/server-side/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java b/tests/server-side/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java
index 9aeccdb56f..851fece4d1 100644
--- a/tests/server-side/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java
+++ b/tests/server-side/com/vaadin/tests/server/component/abstractfield/RemoveListenersOnDetach.java
@@ -7,7 +7,9 @@ import org.junit.Test;
import com.vaadin.data.Property;
import com.vaadin.data.util.AbstractProperty;
import com.vaadin.data.util.converter.Converter.ConversionException;
+import com.vaadin.terminal.WrappedRequest;
import com.vaadin.ui.AbstractField;
+import com.vaadin.ui.Root;
public class RemoveListenersOnDetach {
@@ -15,6 +17,15 @@ public class RemoveListenersOnDetach {
int numReadOnlyChanges = 0;
AbstractField field = new AbstractField() {
+ private Root root = new Root() {
+
+ @Override
+ protected void init(WrappedRequest request) {
+
+ }
+
+ };
+
@Override
public Class<?> getType() {
return null;
@@ -32,6 +43,11 @@ public class RemoveListenersOnDetach {
super.readOnlyStatusChange(event);
numReadOnlyChanges++;
}
+
+ @Override
+ public com.vaadin.ui.Root getRoot() {
+ return root;
+ };
};
Property property = new AbstractProperty() {