diff options
author | Artur Signell <artur@vaadin.com> | 2012-05-04 00:44:42 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2012-05-11 22:18:31 +0300 |
commit | d5ea720082ecbfea98310ea9c860d7ce0ce9757e (patch) | |
tree | 71b01edceb97a719fff922eef7776323f1c9eb81 /src | |
parent | d78656c8d59c3b27bcf1ecb0d008a033b794beb1 (diff) | |
download | vaadin-framework-d5ea720082ecbfea98310ea9c860d7ce0ce9757e.tar.gz vaadin-framework-d5ea720082ecbfea98310ea9c860d7ce0ce9757e.zip |
Fixed problem with sending null values from the client to the server
Diffstat (limited to 'src')
-rw-r--r-- | src/com/vaadin/terminal/gwt/server/JsonCodec.java | 8 |
1 files changed, 6 insertions, 2 deletions
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); + } } /** |