]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixed problem with sending null values from the client to the server
authorArtur Signell <artur@vaadin.com>
Thu, 3 May 2012 21:44:42 +0000 (00:44 +0300)
committerArtur Signell <artur@vaadin.com>
Fri, 11 May 2012 19:18:31 +0000 (22:18 +0300)
src/com/vaadin/terminal/gwt/server/JsonCodec.java

index 750aa7c15b062fa07fdc879cf88d9a2461681e37..ed2bf66cedcbda70da5f7ef318e1f3739cbf9d85 100644 (file)
@@ -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);
+        }
     }
 
     /**