From d5ea720082ecbfea98310ea9c860d7ce0ce9757e Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Fri, 4 May 2012 00:44:42 +0300 Subject: Fixed problem with sending null values from the client to the server --- src/com/vaadin/terminal/gwt/server/JsonCodec.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/com/vaadin') diff --git a/src/com/vaadin/terminal/gwt/server/JsonCodec.java b/src/com/vaadin/terminal/gwt/server/JsonCodec.java index 750aa7c15b..ed2bf66ced 100644 --- a/src/com/vaadin/terminal/gwt/server/JsonCodec.java +++ b/src/com/vaadin/terminal/gwt/server/JsonCodec.java @@ -143,8 +143,12 @@ public class JsonCodec implements Serializable { } // Try to decode object using fields - return decodeObject(targetType, (JSONObject) valueAndType.get(1), - application); + Object value = valueAndType.get(1); + if (value == JSONObject.NULL) { + return null; + } else { + return decodeObject(targetType, (JSONObject) value, application); + } } /** -- cgit v1.2.3