aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/vaadin/terminal/gwt/server/JsonCodec.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/vaadin/terminal/gwt/server/JsonCodec.java b/src/com/vaadin/terminal/gwt/server/JsonCodec.java
index 8091a1d205..df596dba45 100644
--- a/src/com/vaadin/terminal/gwt/server/JsonCodec.java
+++ b/src/com/vaadin/terminal/gwt/server/JsonCodec.java
@@ -14,6 +14,7 @@ import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
+import java.lang.reflect.WildcardType;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -522,6 +523,11 @@ public class JsonCodec implements Serializable {
throw new IllegalArgumentException("type must be defined");
}
+ if (valueType instanceof WildcardType) {
+ throw new IllegalStateException(
+ "Can not serialize type with wildcard: " + valueType);
+ }
+
if (null == value) {
return encodeNull();
}