summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2012-05-04 00:44:42 +0300
committerArtur Signell <artur@vaadin.com>2012-05-11 22:18:31 +0300
commitd5ea720082ecbfea98310ea9c860d7ce0ce9757e (patch)
tree71b01edceb97a719fff922eef7776323f1c9eb81 /src
parentd78656c8d59c3b27bcf1ecb0d008a033b794beb1 (diff)
downloadvaadin-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.java8
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);
+ }
}
/**